diff options
author | Release Engineers <releng@openoffice.org> | 2009-05-06 10:59:57 +0000 |
---|---|---|
committer | Release Engineers <releng@openoffice.org> | 2009-05-06 10:59:57 +0000 |
commit | 4d3148e0b7ee607de9c86e9e9aa79e9cd423f1f1 (patch) | |
tree | 5c5025d215f13e88b0ab36d10e91b6c064bce7a9 /svx | |
parent | 924c156e4a9333ac972a91d185380220860cc91b (diff) |
CWS-TOOLING: integrate CWS mba32issues01
2009-05-05 18:23:27 +0200 mba r271547 : apply diffs from m45->m47 for all files moved from dialog to cui
2009-05-05 18:22:02 +0200 mba r271545 : apply diffs from m45->m47 for all files moved from dialog to cui
2009-05-05 18:16:42 +0200 mba r271544 : apply diffs from m45->m47 for all files moved from dialog to cui
2009-04-29 19:35:58 +0200 mba r271392 : #i73672#: unify commands for inserting special characters
2009-04-29 18:01:27 +0200 mba r271391 : #i101337#: missing string resources
2009-04-29 18:01:10 +0200 mba r271390 : #i101337#: missing string resources
2009-04-29 15:42:47 +0200 mba r271380 : concurrency problem in multithreaded dmake due to missing dependency
2009-04-28 17:36:03 +0200 tbo r271336 : #i99432#
2009-04-28 13:57:52 +0200 mba r271322 : #i101302#: ctor might be called with pSet=0
2009-04-22 19:32:39 +0200 tbo r271138 : #i99432#
2009-04-09 14:46:03 +0200 mba r270709 : make sendreportw32.cxx compile with pch
2009-04-06 16:05:07 +0200 mba r270568 : #i99432#: some tweaks for build order
2009-04-06 15:38:52 +0200 mba r270558 : typo
2009-04-06 13:36:19 +0200 mba r270542 : #i99432#: split of localization also
2009-04-06 13:19:06 +0200 mba r270539 : #i99432#: split up srs files also
2009-04-03 17:57:59 +0200 mba r270513 : #i99432#: split dialog folder into two
2009-04-03 17:56:46 +0200 mba r270512 : #i99432#: split dialog folder into two
2009-04-01 22:15:00 +0200 mba r270364 : warnings on Linux
2009-04-01 22:10:44 +0200 mba r270363 : warnings on Linux
2009-04-01 21:43:54 +0200 mba r270362 : warning fixed
2009-04-01 21:41:27 +0200 mba r270361 : warning on Linux fixed
2009-04-01 21:35:44 +0200 mba r270360 : warning fixed
2009-04-01 20:19:59 +0200 mba r270358 : warning found on Linux fixed
2009-04-01 19:23:38 +0200 mba r270354 : warning due to missing eof
2009-04-01 18:56:25 +0200 mba r270352 : linking problem fixed that appeared only on mac
2009-04-01 18:41:30 +0200 mba r270350 : warnings discovered on Linux fixed
2009-04-01 18:34:28 +0200 mba r270349 : some fixes for warnings and include problems discoverd after resync and build on mac
2009-04-01 14:08:22 +0200 mba r270328 : CWS-TOOLING: rebase CWS mba32issues01 to trunk@270033 (milestone: DEV300:m45)
2009-03-04 18:13:35 +0100 mba r268858 : #i99432#: more dialogs moved to cui
2009-03-04 17:47:41 +0100 mba r268854 : #i99432#: more dialogs moved to cui
2009-03-04 17:32:39 +0100 mba r268851 : warning fixed
2009-03-04 12:59:26 +0100 mba r268814 : #i99432#: more dialogs moved to cui
2009-03-04 11:49:03 +0100 mba r268802 : #i99432#: CharmapDialog moved to cui
2009-03-04 10:46:00 +0100 mba r268795 : #i99432#: CharmapDialog moved to cui
2009-03-04 10:43:50 +0100 mba r268794 : #i99432#: CharmapDialog moved to cui
2009-03-04 10:00:29 +0100 mba r268792 : #i99432#: CharmapDialog moved to cui
2009-03-04 10:00:03 +0100 mba r268791 : #i99432#: CharmapDialog moved to cui
2009-03-04 09:59:43 +0100 mba r268790 : #i99432#: CharmapDialog moved to cui
2009-03-04 09:58:51 +0100 mba r268789 : #i99432#: CharmapDialog moved to cui
2009-03-04 09:58:16 +0100 mba r268788 : #i99432#: CharmapDialog moved to cui
2009-03-03 16:33:14 +0100 mba r268763 : #i99465#: new SfxAbstractDialog interface and creation methods
2009-03-03 16:32:28 +0100 mba r268762 : #i99432#: some tabpages moved to cui
2009-03-03 16:32:09 +0100 mba r268761 : #i99432#: some tabpages moved to cui
2009-03-03 16:29:40 +0100 mba r268760 : #i99465#: new SfxAbstractDialog interface and creation methods
2009-03-03 16:29:08 +0100 mba r268759 : #i99432#: MacroAssignment page moved to cui
2009-03-03 16:28:41 +0100 mba r268758 : #i99432#: MacroAssignment page moved to cui
2009-03-03 16:28:18 +0100 mba r268757 : #i99465#: new SfxAbstractDialog interface and creation methods
2009-03-03 16:27:36 +0100 mba r268756 : #i99465#: replace FN_SYMBOL by SID_CHARMAP
2009-03-03 16:27:02 +0100 mba r268755 : #i99465#: new SfxAbstractDialog interface and creation methods
2009-03-03 16:26:23 +0100 mba r268754 : #i99465#: new SfxAbstractDialog interface and creation methods
2009-03-03 16:25:30 +0100 mba r268753 : #i99465#: new SfxAbstractDialog interface and creation methods
2009-03-03 16:24:49 +0100 mba r268752 : #i99465#: new SfxAbstractDialog interface and creation methods
2009-03-03 16:24:35 +0100 mba r268751 : #i99432#: MacroAssignment page moved to cui
2009-03-03 16:23:20 +0100 mba r268750 : #i99465#: new SfxAbstractDialog interface and creation methods
2009-03-03 16:23:04 +0100 mba r268749 : #i99432#: MacroAssignment page moved to cui
2009-03-03 16:21:56 +0100 mba r268748 : #i99465#: new SfxAbstractDialog interface and creation methods
2009-03-03 16:18:39 +0100 mba r268747 : #i99432#: MacroAssignment page moved to cui
2009-03-03 16:13:14 +0100 mba r268745 : #i99465#: replace FN_SYMBOL by SID_CHARMAP
2009-03-03 16:02:54 +0100 mba r268738 : #i99432#: moved MacroAssignment TabPage from sfx2
2009-03-03 14:57:58 +0100 mba r268729 : #i99465#: transport return value via ItemSet
2009-03-03 00:08:10 +0100 mba r268701 : #i99432#: move acccfg to cuilib
2009-03-03 00:07:32 +0100 mba r268700 : #i99432#: move acccfg to cuilib
2009-03-03 00:02:01 +0100 mba r268699 : #i99432#: move acccfg to cuilib
2009-03-03 00:01:38 +0100 mba r268698 : #i99432#: move acccfg to cuilib
2009-03-03 00:01:11 +0100 mba r268697 : #i99432#: move acccfg to cuilib
2009-03-03 00:00:40 +0100 mba r268696 : #i99432#: move acccfg to cuilib
2009-03-03 00:00:06 +0100 mba r268695 : #i99432#: replace SfxAbstractSingleTabDialog by SfxAbstractDialog
2009-03-02 23:59:22 +0100 mba r268694 : #i99432#: move acccfg to cuilib
2009-03-02 23:57:19 +0100 mba r268693 : #i99432#: move acccfg to svx
2009-03-02 23:56:14 +0100 mba r268692 : #i99432#: replace SfxAbstractSingleTabDialog by SfxAbstractDialog
2009-03-02 23:49:37 +0100 mba r268691 : #i99785#: consolidate dialogs library
2009-03-02 17:26:40 +0100 mba r268683 : #i99785#: consolidate dialogs library
2009-03-02 17:24:28 +0100 mba r268682 : i99465#: consolidate slot for InsertSymbol command
2009-03-02 17:22:29 +0100 mba r268681 : #i99785#: consolidate dialogs library
2009-03-02 17:18:11 +0100 mba r268680 : i99432#: move accelconfig and macroassignment to cui
2009-03-02 17:08:30 +0100 mba r268679 : #i99785#: consolidate dialogs library
2009-03-02 17:06:57 +0100 mba r268678 : #i99785#: consolidate dialogs library
2009-03-02 17:06:30 +0100 mba r268677 : #i99785#: consolidate dialogs library
2009-03-02 17:05:02 +0100 mba r268676 : #i99785#: consolidate dialogs library
2009-03-02 17:04:35 +0100 mba r268675 : #i99785#: consolidate dialogs library
2009-03-02 16:47:53 +0100 mba r268673 : i99432#: move accelconfig and macroassignment to cui
2009-03-02 16:45:17 +0100 mba r268671 : i99432#: move accelconfig and macroassignment to cui
2009-03-02 16:39:59 +0100 mba r268670 : i99432#: move accelconfig and macroassignment to cui
2009-03-02 16:38:59 +0100 mba r268668 : i99432#: move accelconfig and macroassignment to cui
2009-03-02 16:38:28 +0100 mba r268667 : i99432#: move accelconfig and macroassignment to cui
2009-03-02 16:36:06 +0100 mba r268666 : i99432#: move accelconfig and macroassignment to cui
2009-03-02 16:29:50 +0100 mba r268663 : i99432#: move accelconfig and macroassignment to cui
2009-03-02 16:24:00 +0100 mba r268659 : i99432#: move accelconfig and macroassignment to cui
2009-03-02 16:23:31 +0100 mba r268658 : i99432#: move accelconfig and macroassignment to cui
2009-03-02 16:22:41 +0100 mba r268657 : i99432#: move accelconfig and macroassignment to cui
2009-02-25 16:57:26 +0100 mba r268453 : obsolete
2009-02-17 10:50:51 +0100 mba r267846 : obsolete
2009-02-12 16:33:54 +0100 mba r267676 : #i96834#: warning fixed
2009-02-11 19:28:47 +0100 mba r267626 : #i91978#: unused code
2009-02-11 18:37:47 +0100 mba r267625 : metafile output, fixes for 3 layer office
2009-02-11 12:56:28 +0100 mba r267593 : selective trees; incomplete build lists; metafile output
Diffstat (limited to 'svx')
-rw-r--r-- | svx/inc/databaseregistrationui.hxx | 4 | ||||
-rw-r--r-- | svx/inc/helpid.hrc | 13 | ||||
-rw-r--r-- | svx/inc/svx/brshitem.hxx | 3 | ||||
-rw-r--r-- | svx/inc/svx/charmap.hxx | 78 | ||||
-rw-r--r-- | svx/inc/svx/dialogs.hrc | 4 | ||||
-rw-r--r-- | svx/inc/svx/svxdlg.hxx | 32 | ||||
-rw-r--r-- | svx/inc/svx/xflbckit.hxx | 5 | ||||
-rw-r--r-- | svx/inc/svx/xflbmpit.hxx | 3 | ||||
-rw-r--r-- | svx/inc/svx/xflbmsli.hxx | 3 | ||||
-rw-r--r-- | svx/inc/svx/xflbmsxy.hxx | 5 | ||||
-rw-r--r-- | svx/inc/svx/xflboxy.hxx | 5 | ||||
-rw-r--r-- | svx/inc/svx/xflbtoxy.hxx | 5 | ||||
-rw-r--r-- | svx/prj/build.lst | 6 | ||||
-rw-r--r-- | svx/sdi/svx.sdi | 2 | ||||
-rw-r--r-- | svx/source/cui/ControlFocusHelper.hxx (renamed from svx/source/dialog/ControlFocusHelper.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/SpellAttrib.cxx (renamed from svx/source/dialog/SpellAttrib.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/SpellAttrib.hxx (renamed from svx/source/dialog/SpellAttrib.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/SpellDialog.cxx (renamed from svx/source/dialog/SpellDialog.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/SpellDialog.hrc (renamed from svx/source/dialog/SpellDialog.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/SpellDialog.src (renamed from svx/source/dialog/SpellDialog.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/acccfg.cxx | 1700 | ||||
-rw-r--r-- | svx/source/cui/acccfg.hrc | 78 | ||||
-rw-r--r-- | svx/source/cui/acccfg.hxx | 288 | ||||
-rw-r--r-- | svx/source/cui/acccfg.src | 360 | ||||
-rw-r--r-- | svx/source/cui/align.cxx (renamed from svx/source/dialog/align.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/align.hrc (renamed from svx/source/dialog/align.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/align.hxx (renamed from svx/source/dialog/align.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/align.src (renamed from svx/source/dialog/align.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/autocdlg.cxx (renamed from svx/source/dialog/autocdlg.cxx) | 4 | ||||
-rw-r--r-- | svx/source/cui/autocdlg.hrc (renamed from svx/source/dialog/autocdlg.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/autocdlg.hxx (renamed from svx/source/dialog/autocdlg.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/autocdlg.src (renamed from svx/source/dialog/autocdlg.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/backgrnd.cxx (renamed from svx/source/dialog/backgrnd.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/backgrnd.hrc (renamed from svx/source/dialog/backgrnd.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/backgrnd.hxx (renamed from svx/source/dialog/backgrnd.hxx) | 4 | ||||
-rw-r--r-- | svx/source/cui/backgrnd.src (renamed from svx/source/dialog/backgrnd.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/bbdlg.cxx (renamed from svx/source/dialog/bbdlg.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/bbdlg.hxx (renamed from svx/source/dialog/bbdlg.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/bbdlg.src (renamed from svx/source/dialog/bbdlg.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/border.cxx (renamed from svx/source/dialog/border.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/border.hrc (renamed from svx/source/dialog/border.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/border.hxx (renamed from svx/source/dialog/border.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/border.src (renamed from svx/source/dialog/border.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/borderconn.cxx (renamed from svx/source/dialog/borderconn.cxx) | 11 | ||||
-rw-r--r-- | svx/source/cui/borderconn.hxx (renamed from svx/source/dialog/borderconn.hxx) | 7 | ||||
-rw-r--r-- | svx/source/cui/cfg.cxx (renamed from svx/source/dialog/cfg.cxx) | 46 | ||||
-rw-r--r-- | svx/source/cui/cfg.hrc (renamed from svx/source/dialog/cfg.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/cfg.hxx (renamed from svx/source/dialog/cfg.hxx) | 6 | ||||
-rw-r--r-- | svx/source/cui/cfg.src (renamed from svx/source/dialog/cfg.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/cfgchart.cxx (renamed from svx/source/dialog/cfgchart.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/cfgchart.hxx (renamed from svx/source/dialog/cfgchart.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/cfgutil.cxx | 1801 | ||||
-rw-r--r-- | svx/source/cui/cfgutil.hxx | 220 | ||||
-rw-r--r-- | svx/source/cui/chardlg.cxx (renamed from svx/source/dialog/chardlg.cxx) | 39 | ||||
-rw-r--r-- | svx/source/cui/chardlg.h (renamed from svx/source/dialog/chardlg.h) | 0 | ||||
-rw-r--r-- | svx/source/cui/chardlg.hrc (renamed from svx/source/dialog/chardlg.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/chardlg.hxx (renamed from svx/source/dialog/chardlg.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/chardlg.src (renamed from svx/source/dialog/chardlg.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/charmap.hrc (renamed from svx/source/dialog/charmap.hrc) | 4 | ||||
-rw-r--r-- | svx/source/cui/charmap.src | 161 | ||||
-rw-r--r-- | svx/source/cui/commonlingui.cxx (renamed from svx/source/dialog/commonlingui.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/commonlingui.hxx (renamed from svx/source/dialog/commonlingui.hxx) | 5 | ||||
-rw-r--r-- | svx/source/cui/commonlingui.src (renamed from svx/source/dialog/commonlingui.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/connect.cxx (renamed from svx/source/dialog/connect.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/connect.hxx (renamed from svx/source/dialog/connect.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/connect.src (renamed from svx/source/dialog/connect.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/connpoolconfig.cxx (renamed from svx/source/dialog/connpoolconfig.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/connpoolconfig.hxx (renamed from svx/source/dialog/connpoolconfig.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/connpooloptions.cxx (renamed from svx/source/dialog/connpooloptions.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/connpooloptions.hrc (renamed from svx/source/dialog/connpooloptions.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/connpooloptions.hxx (renamed from svx/source/dialog/connpooloptions.hxx) | 6 | ||||
-rw-r--r-- | svx/source/cui/connpooloptions.src (renamed from svx/source/dialog/connpooloptions.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/connpoolsettings.cxx (renamed from svx/source/dialog/connpoolsettings.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/connpoolsettings.hxx (renamed from svx/source/dialog/connpoolsettings.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/cuicharmap.cxx | 591 | ||||
-rw-r--r-- | svx/source/cui/cuicharmap.hxx (renamed from svx/source/dialog/cuicharmap.hxx) | 79 | ||||
-rw-r--r-- | svx/source/cui/cuiexp.cxx (renamed from svx/source/dialog/cuiexp.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/cuifmsearch.cxx (renamed from svx/source/dialog/cuifmsearch.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/cuifmsearch.hxx (renamed from svx/source/dialog/cuifmsearch.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/cuigaldlg.cxx (renamed from svx/source/dialog/cuigaldlg.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/cuigaldlg.hxx (renamed from svx/source/dialog/cuigaldlg.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/cuigrfflt.cxx (renamed from svx/source/dialog/cuigrfflt.cxx) | 2 | ||||
-rw-r--r-- | svx/source/cui/cuigrfflt.hxx (renamed from svx/source/dialog/cuigrfflt.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/cuihyperdlg.cxx (renamed from svx/source/dialog/cuihyperdlg.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/cuihyperdlg.hxx (renamed from svx/source/dialog/cuihyperdlg.hxx) | 0 | ||||
-rwxr-xr-x | svx/source/cui/cuiimapdlg.hrc | 50 | ||||
-rwxr-xr-x | svx/source/cui/cuiimapdlg.src | 151 | ||||
-rw-r--r-- | svx/source/cui/cuiimapwnd.cxx (renamed from svx/source/dialog/cuiimapwnd.cxx) | 8 | ||||
-rw-r--r-- | svx/source/cui/cuiimapwnd.hxx (renamed from svx/source/dialog/cuiimapwnd.hxx) | 3 | ||||
-rw-r--r-- | svx/source/cui/cuioptgenrl.hxx (renamed from svx/source/dialog/cuioptgenrl.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/cuisrchdlg.cxx (renamed from svx/source/dialog/cuisrchdlg.cxx) | 4 | ||||
-rw-r--r-- | svx/source/cui/cuisrchdlg.hxx (renamed from svx/source/dialog/cuisrchdlg.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/cuitabarea.hxx (renamed from svx/source/dialog/cuitabarea.hxx) | 6 | ||||
-rw-r--r-- | svx/source/cui/cuitabline.hxx (renamed from svx/source/dialog/cuitabline.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/cuitbxform.cxx (renamed from svx/source/dialog/cuitbxform.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/cuitbxform.hxx (renamed from svx/source/dialog/cuitbxform.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/dbregister.cxx (renamed from svx/source/dialog/dbregister.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/dbregister.hrc (renamed from svx/source/dialog/dbregister.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/dbregister.hxx (renamed from svx/source/dialog/dbregister.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/dbregister.src (renamed from svx/source/dialog/dbregister.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/dbregisterednamesconfig.cxx (renamed from svx/source/dialog/dbregisterednamesconfig.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/dbregisterednamesconfig.hxx (renamed from svx/source/dialog/dbregisterednamesconfig.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/dbregistersettings.cxx (renamed from svx/source/dialog/dbregistersettings.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/dbregistersettings.hxx (renamed from svx/source/dialog/dbregistersettings.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/dlgfact.cxx (renamed from svx/source/dialog/dlgfact.cxx) | 159 | ||||
-rw-r--r-- | svx/source/cui/dlgfact.hxx (renamed from svx/source/dialog/dlgfact.hxx) | 65 | ||||
-rw-r--r-- | svx/source/cui/dlgname.cxx (renamed from svx/source/dialog/dlgname.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/dlgname.hrc (renamed from svx/source/dialog/dlgname.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/dlgname.hxx (renamed from svx/source/dialog/dlgname.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/dlgname.src (renamed from svx/source/dialog/dlgname.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/doclinkdialog.cxx (renamed from svx/source/dialog/doclinkdialog.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/doclinkdialog.hrc (renamed from svx/source/dialog/doclinkdialog.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/doclinkdialog.hxx (renamed from svx/source/dialog/doclinkdialog.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/doclinkdialog.src (renamed from svx/source/dialog/doclinkdialog.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/dstribut.cxx (renamed from svx/source/dialog/dstribut.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/dstribut.hrc (renamed from svx/source/dialog/dstribut.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/dstribut.hxx (renamed from svx/source/dialog/dstribut.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/dstribut.src (renamed from svx/source/dialog/dstribut.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/eventdlg.cxx (renamed from svx/source/dialog/eventdlg.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/eventdlg.hrc (renamed from svx/source/dialog/eventdlg.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/eventdlg.src (renamed from svx/source/dialog/eventdlg.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/fontsubs.cxx (renamed from svx/source/dialog/fontsubs.cxx) | 4 | ||||
-rw-r--r-- | svx/source/cui/fontsubs.hrc (renamed from svx/source/dialog/fontsubs.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/fontsubs.hxx (renamed from svx/source/dialog/fontsubs.hxx) | 3 | ||||
-rw-r--r-- | svx/source/cui/fontsubs.src (renamed from svx/source/dialog/fontsubs.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/grfflt.hrc (renamed from svx/source/dialog/grfflt.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/grfflt.src (renamed from svx/source/dialog/grfflt.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/grfpage.cxx (renamed from svx/source/dialog/grfpage.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/grfpage.hrc (renamed from svx/source/dialog/grfpage.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/grfpage.hxx (renamed from svx/source/dialog/grfpage.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/grfpage.src (renamed from svx/source/dialog/grfpage.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/hangulhanjadlg.cxx (renamed from svx/source/dialog/hangulhanjadlg.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/hangulhanjadlg.hrc (renamed from svx/source/dialog/hangulhanjadlg.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/hangulhanjadlg.hxx (renamed from svx/source/dialog/hangulhanjadlg.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/hangulhanjadlg.src (renamed from svx/source/dialog/hangulhanjadlg.src) | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | svx/source/cui/headertablistbox.hxx (renamed from svx/source/inc/headertablistbox.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/hldocntp.cxx (renamed from svx/source/dialog/hldocntp.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/hldocntp.hxx (renamed from svx/source/dialog/hldocntp.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/hldoctp.cxx (renamed from svx/source/dialog/hldoctp.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/hldoctp.hxx (renamed from svx/source/dialog/hldoctp.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/hlinettp.cxx (renamed from svx/source/dialog/hlinettp.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/hlinettp.hxx (renamed from svx/source/dialog/hlinettp.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/hlmailtp.cxx (renamed from svx/source/dialog/hlmailtp.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/hlmailtp.hxx (renamed from svx/source/dialog/hlmailtp.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/hlmarkwn.cxx (renamed from svx/source/dialog/hlmarkwn.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/hlmarkwn.src (renamed from svx/source/dialog/hlmarkwn.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/hltpbase.cxx (renamed from svx/source/dialog/hltpbase.cxx) | 1 | ||||
-rw-r--r-- | svx/source/cui/hltpbase.hxx (renamed from svx/source/dialog/hltpbase.hxx) | 1 | ||||
-rw-r--r-- | svx/source/cui/iconcdlg.cxx (renamed from svx/source/dialog/iconcdlg.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/iconcdlg.hxx (renamed from svx/source/dialog/iconcdlg.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/iconcdlg.src (renamed from svx/source/dialog/iconcdlg.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/init.cxx (renamed from svx/source/init/init.cxx) | 30 | ||||
-rw-r--r-- | svx/source/cui/insdlg.cxx (renamed from svx/source/dialog/insdlg.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/insdlg.hxx (renamed from svx/source/dialog/insdlg.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/internationaloptions.cxx (renamed from svx/source/dialog/internationaloptions.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/internationaloptions.hrc (renamed from svx/source/dialog/internationaloptions.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/internationaloptions.hxx (renamed from svx/source/dialog/internationaloptions.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/internationaloptions.src (renamed from svx/source/dialog/internationaloptions.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/labdlg.cxx (renamed from svx/source/dialog/labdlg.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/labdlg.hrc (renamed from svx/source/dialog/labdlg.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/labdlg.hxx (renamed from svx/source/dialog/labdlg.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/labdlg.src (renamed from svx/source/dialog/labdlg.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/linkdlg.cxx (renamed from svx/source/dialog/linkdlg.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/linkdlg.hxx (renamed from svx/source/dialog/linkdlg.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/macroass.cxx | 719 | ||||
-rw-r--r-- | svx/source/cui/macroass.hrc | 85 | ||||
-rwxr-xr-x | svx/source/cui/macroass.hxx | 146 | ||||
-rw-r--r-- | svx/source/cui/macroass.src | 143 | ||||
-rw-r--r-- | svx/source/cui/macropg.cxx (renamed from svx/source/dialog/macropg.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/macropg.hrc (renamed from svx/source/dialog/macropg.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/macropg.hxx (renamed from svx/inc/macropg.hxx) | 7 | ||||
-rw-r--r-- | svx/source/cui/macropg.src (renamed from svx/source/dialog/macropg.src) | 0 | ||||
-rwxr-xr-x | svx/source/cui/makefile.mk | 232 | ||||
-rw-r--r-- | svx/source/cui/measure.cxx (renamed from svx/source/dialog/measure.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/measure.hrc (renamed from svx/source/dialog/measure.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/measure.hxx (renamed from svx/source/dialog/measure.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/measure.src (renamed from svx/source/dialog/measure.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/multifil.cxx (renamed from svx/source/dialog/multifil.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/multifil.hxx (renamed from svx/source/dialog/multifil.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/multipat.cxx (renamed from svx/source/dialog/multipat.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/multipat.hxx (renamed from svx/source/dialog/multipat.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/newtabledlg.cxx (renamed from svx/source/dialog/newtabledlg.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/newtabledlg.hrc (renamed from svx/source/dialog/newtabledlg.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/newtabledlg.hxx (renamed from svx/source/dialog/newtabledlg.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/newtabledlg.src (renamed from svx/source/dialog/newtabledlg.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/numfmt.cxx (renamed from svx/source/dialog/numfmt.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/numfmt.hrc (renamed from svx/source/dialog/numfmt.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/numfmt.hxx (renamed from svx/source/dialog/numfmt.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/numfmt.src (renamed from svx/source/dialog/numfmt.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/numpages.cxx (renamed from svx/source/dialog/numpages.cxx) | 15 | ||||
-rw-r--r-- | svx/source/cui/numpages.hrc (renamed from svx/source/dialog/numpages.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/numpages.hxx (renamed from svx/source/dialog/numpages.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/numpages.src (renamed from svx/source/dialog/numpages.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/optHeaderTabListbox.cxx (renamed from svx/source/dialog/optHeaderTabListbox.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/optHeaderTabListbox.hxx (renamed from svx/source/dialog/optHeaderTabListbox.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/optaccessibility.cxx (renamed from svx/source/dialog/optaccessibility.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/optaccessibility.hxx (renamed from svx/source/dialog/optaccessibility.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/optasian.cxx (renamed from svx/source/dialog/optasian.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/optasian.hxx (renamed from svx/source/dialog/optasian.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/optchart.cxx (renamed from svx/source/dialog/optchart.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/optchart.hxx (renamed from svx/source/dialog/optchart.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/optcolor.cxx (renamed from svx/source/dialog/optcolor.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/optcolor.hxx (renamed from svx/source/dialog/optcolor.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/optctl.cxx (renamed from svx/source/dialog/optctl.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/optctl.hxx (renamed from svx/source/dialog/optctl.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/optdict.cxx (renamed from svx/source/dialog/optdict.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/optdict.hxx (renamed from svx/source/dialog/optdict.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/optfltr.cxx (renamed from svx/source/dialog/optfltr.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/optfltr.hrc (renamed from svx/source/dialog/optfltr.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/optfltr.hxx (renamed from svx/source/dialog/optfltr.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/optfltr.src (renamed from svx/source/dialog/optfltr.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/optgdlg.cxx (renamed from svx/source/dialog/optgdlg.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/optgdlg.hrc (renamed from svx/source/dialog/optgdlg.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/optgdlg.hxx (renamed from svx/source/dialog/optgdlg.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/optgdlg.src (renamed from svx/source/dialog/optgdlg.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/optgenrl.cxx (renamed from svx/source/dialog/optgenrl.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/opthtml.cxx (renamed from svx/source/dialog/opthtml.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/opthtml.hrc (renamed from svx/source/dialog/opthtml.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/opthtml.hxx (renamed from svx/source/dialog/opthtml.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/opthtml.src (renamed from svx/source/dialog/opthtml.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/optimprove.cxx (renamed from svx/source/dialog/optimprove.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/optimprove2.cxx (renamed from svx/source/dialog/optimprove2.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/optinet2.cxx (renamed from svx/source/dialog/optinet2.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/optinet2.hxx (renamed from svx/source/dialog/optinet2.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/optjava.cxx (renamed from svx/source/dialog/optjava.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/optjava.hrc (renamed from svx/source/dialog/optjava.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/optjava.hxx (renamed from svx/source/dialog/optjava.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/optjava.src (renamed from svx/source/dialog/optjava.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/optjsearch.cxx (renamed from svx/source/dialog/optjsearch.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/optjsearch.hxx (renamed from svx/source/dialog/optjsearch.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/optmemory.cxx (renamed from svx/source/dialog/optmemory.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/optmemory.hrc (renamed from svx/source/dialog/optmemory.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/optmemory.hxx (renamed from svx/source/dialog/optmemory.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/optmemory.src (renamed from svx/source/dialog/optmemory.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/optpath.cxx (renamed from svx/source/dialog/optpath.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/optpath.hxx (renamed from svx/source/dialog/optpath.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/optsave.cxx (renamed from svx/source/dialog/optsave.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/optsave.hxx (renamed from svx/source/dialog/optsave.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/optupdt.cxx (renamed from svx/source/dialog/optupdt.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/optupdt.hrc (renamed from svx/source/dialog/optupdt.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/optupdt.hxx (renamed from svx/source/dialog/optupdt.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/optupdt.src (renamed from svx/source/dialog/optupdt.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/page.cxx (renamed from svx/source/dialog/page.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/page.h (renamed from svx/source/dialog/page.h) | 0 | ||||
-rw-r--r-- | svx/source/cui/page.hrc (renamed from svx/source/dialog/page.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/page.hxx (renamed from svx/source/dialog/page.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/page.src (renamed from svx/source/dialog/page.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/paragrph.cxx (renamed from svx/source/dialog/paragrph.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/paragrph.hrc (renamed from svx/source/dialog/paragrph.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/paragrph.hxx (renamed from svx/source/dialog/paragrph.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/paragrph.src (renamed from svx/source/dialog/paragrph.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/pastedlg.cxx (renamed from svx/source/dialog/pastedlg.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/pastedlg.hxx (renamed from svx/source/dialog/pastedlg.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/plfilter.cxx (renamed from svx/source/dialog/plfilter.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/postdlg.cxx (renamed from svx/source/dialog/postdlg.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/postdlg.hrc (renamed from svx/source/dialog/postdlg.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/postdlg.hxx (renamed from svx/source/dialog/postdlg.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/postdlg.src (renamed from svx/source/dialog/postdlg.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/readonlyimage.cxx (renamed from svx/source/dialog/readonlyimage.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/readonlyimage.hxx (renamed from svx/source/dialog/readonlyimage.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/readonlyimage.src (renamed from svx/source/dialog/readonlyimage.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/scriptdlg.cxx (renamed from svx/source/dialog/scriptdlg.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/scriptdlg.hrc (renamed from svx/source/dialog/scriptdlg.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/scriptdlg.hxx (renamed from svx/source/dialog/scriptdlg.hxx) | 5 | ||||
-rw-r--r-- | svx/source/cui/scriptdlg.src (renamed from svx/source/dialog/scriptdlg.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/sdbcdriverenum.cxx (renamed from svx/source/dialog/sdbcdriverenum.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/sdbcdriverenum.hxx (renamed from svx/source/dialog/sdbcdriverenum.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/sdrcelldlg.cxx (renamed from svx/source/dialog/sdrcelldlg.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/sdrcelldlg.hxx (renamed from svx/source/dialog/sdrcelldlg.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/sdrcelldlg.src (renamed from svx/source/dialog/sdrcelldlg.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/securityoptions.cxx (renamed from svx/source/dialog/securityoptions.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/securityoptions.hrc (renamed from svx/source/dialog/securityoptions.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/securityoptions.hxx (renamed from svx/source/dialog/securityoptions.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/securityoptions.src (renamed from svx/source/dialog/securityoptions.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/selector.cxx (renamed from svx/source/dialog/selector.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/selector.hrc (renamed from svx/source/dialog/selector.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/selector.hxx (renamed from svx/source/dialog/selector.hxx) | 4 | ||||
-rw-r--r-- | svx/source/cui/selector.src (renamed from svx/source/dialog/selector.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/showcols.cxx (renamed from svx/source/dialog/showcols.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/showcols.hxx (renamed from svx/source/dialog/showcols.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/splitcelldlg.cxx (renamed from svx/source/dialog/splitcelldlg.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/splitcelldlg.hrc (renamed from svx/source/dialog/splitcelldlg.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/splitcelldlg.hxx (renamed from svx/source/dialog/splitcelldlg.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/splitcelldlg.src (renamed from svx/source/dialog/splitcelldlg.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/srchxtra.cxx (renamed from svx/source/dialog/srchxtra.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/srchxtra.hrc (renamed from svx/source/dialog/srchxtra.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/srchxtra.hxx (renamed from svx/source/dialog/srchxtra.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/srchxtra.src (renamed from svx/source/dialog/srchxtra.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/svuidlg.hrc (renamed from svx/source/dialog/svuidlg.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/svuidlg.src (renamed from svx/source/dialog/svuidlg.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/swpossizetabpage.cxx (renamed from svx/source/dialog/swpossizetabpage.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/swpossizetabpage.hrc (renamed from svx/source/dialog/swpossizetabpage.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/swpossizetabpage.hxx (renamed from svx/source/dialog/swpossizetabpage.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/swpossizetabpage.src (renamed from svx/source/dialog/swpossizetabpage.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/tabarea.cxx (renamed from svx/source/dialog/tabarea.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/tabarea.hrc (renamed from svx/source/dialog/tabarea.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/tabarea.src (renamed from svx/source/dialog/tabarea.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/tabline.cxx (renamed from svx/source/dialog/tabline.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/tabline.hrc (renamed from svx/source/dialog/tabline.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/tabline.src (renamed from svx/source/dialog/tabline.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/tabstpge.cxx (renamed from svx/source/dialog/tabstpge.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/tabstpge.hrc (renamed from svx/source/dialog/tabstpge.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/tabstpge.hxx (renamed from svx/source/dialog/tabstpge.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/tabstpge.src (renamed from svx/source/dialog/tabstpge.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/textanim.cxx (renamed from svx/source/dialog/textanim.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/textanim.hrc (renamed from svx/source/dialog/textanim.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/textanim.hxx (renamed from svx/source/dialog/textanim.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/textanim.src (renamed from svx/source/dialog/textanim.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/textattr.cxx (renamed from svx/source/dialog/textattr.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/textattr.hrc (renamed from svx/source/dialog/textattr.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/textattr.hxx (renamed from svx/source/dialog/textattr.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/textattr.src (renamed from svx/source/dialog/textattr.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/tparea.cxx (renamed from svx/source/dialog/tparea.cxx) | 12 | ||||
-rw-r--r-- | svx/source/cui/tpbitmap.cxx (renamed from svx/source/dialog/tpbitmap.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/tpcolor.cxx (renamed from svx/source/dialog/tpcolor.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/tpgradnt.cxx (renamed from svx/source/dialog/tpgradnt.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/tphatch.cxx (renamed from svx/source/dialog/tphatch.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/tpline.cxx (renamed from svx/source/dialog/tpline.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/tplnedef.cxx (renamed from svx/source/dialog/tplnedef.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/tplneend.cxx (renamed from svx/source/dialog/tplneend.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/tpshadow.cxx (renamed from svx/source/dialog/tpshadow.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/transfrm.cxx (renamed from svx/source/dialog/transfrm.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/transfrm.hrc (renamed from svx/source/dialog/transfrm.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/transfrm.hxx (renamed from svx/source/dialog/transfrm.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/transfrm.src (renamed from svx/source/dialog/transfrm.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/treeopt.cxx (renamed from svx/source/dialog/treeopt.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/treeopt.hrc (renamed from svx/source/dialog/treeopt.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/treeopt.hxx (renamed from svx/source/dialog/treeopt.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/treeopt.src (renamed from svx/source/dialog/treeopt.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/webconninfo.cxx (renamed from svx/source/dialog/webconninfo.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/webconninfo.hrc (renamed from svx/source/dialog/webconninfo.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/webconninfo.hxx (renamed from svx/source/dialog/webconninfo.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/webconninfo.src (renamed from svx/source/dialog/webconninfo.src) | 0 | ||||
-rw-r--r-- | svx/source/cui/winpluginlib.cpp (renamed from svx/source/dialog/winpluginlib.cpp) | 0 | ||||
-rw-r--r-- | svx/source/cui/zoom.cxx (renamed from svx/source/dialog/zoom.cxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/zoom.hrc (renamed from svx/source/dialog/zoom.hrc) | 0 | ||||
-rw-r--r-- | svx/source/cui/zoom.hxx (renamed from svx/source/dialog/zoom.hxx) | 0 | ||||
-rw-r--r-- | svx/source/cui/zoom.src (renamed from svx/source/dialog/zoom.src) | 0 | ||||
-rw-r--r-- | svx/source/dialog/charmap.cxx | 403 | ||||
-rw-r--r-- | svx/source/dialog/cuicharmap.cxx | 136 | ||||
-rw-r--r-- | svx/source/dialog/databaseregistrationui.cxx | 6 | ||||
-rw-r--r-- | svx/source/dialog/grfflt.cxx | 2 | ||||
-rw-r--r-- | svx/source/dialog/hyperdlg.cxx | 4 | ||||
-rw-r--r-- | svx/source/dialog/imapdlg.hrc | 22 | ||||
-rw-r--r-- | svx/source/dialog/imapdlg.src | 118 | ||||
-rw-r--r-- | svx/source/dialog/imapwnd.cxx | 74 | ||||
-rw-r--r-- | svx/source/dialog/makefile.mk | 427 | ||||
-rw-r--r-- | svx/source/dialog/sendreportw32.cxx | 1 | ||||
-rw-r--r-- | svx/source/dialog/srchdlg.cxx | 4 | ||||
-rw-r--r-- | svx/source/dialog/svxbmpnumvalueset.cxx | 1 | ||||
-rw-r--r-- | svx/source/dialog/test.src | 583 | ||||
-rwxr-xr-x[-rw-r--r--] | svx/source/dialog/ucsubset.src (renamed from svx/source/dialog/charmap.src) | 115 | ||||
-rw-r--r-- | svx/source/init/makefile.mk | 49 | ||||
-rw-r--r-- | svx/util/cui.map | 1 | ||||
-rw-r--r-- | svx/util/hidother.src | 4 | ||||
-rw-r--r-- | svx/util/makefile.mk | 12 |
356 files changed, 7106 insertions, 2289 deletions
diff --git a/svx/inc/databaseregistrationui.hxx b/svx/inc/databaseregistrationui.hxx index 59b75aaedf83..0bded1307815 100644 --- a/svx/inc/databaseregistrationui.hxx +++ b/svx/inc/databaseregistrationui.hxx @@ -36,6 +36,10 @@ class Window; +#define SID_SB_POOLING_ENABLED (RID_OFA_START + 247) +#define SID_SB_DRIVER_TIMEOUTS (RID_OFA_START + 248) +#define SID_SB_DB_REGISTER (RID_OFA_START + 249) + //........................................................................ namespace svx { diff --git a/svx/inc/helpid.hrc b/svx/inc/helpid.hrc index c9ae6bb34b70..3cac79c92f80 100644 --- a/svx/inc/helpid.hrc +++ b/svx/inc/helpid.hrc @@ -809,6 +809,17 @@ #define HID_NUMBERFORMAT_WND_NUMBER_PREVIEW (HID_SVX_EXT0_START + 207) #define HID_SPLDLG_BUTTON_IGNORERULE (HID_SVX_EXT0_START + 208) + +#define HID_CONFIG_ACCEL (HID_SVX_EXT0_START + 209) +#define HID_ACCELCONFIG_LISTBOX (HID_SVX_EXT0_START + 210) +#define HID_CONFIGGROUP_ACC_LISTBOX (HID_SVX_EXT0_START + 211) +#define HID_CONFIGFUNCTION_ACC_LISTBOX (HID_SVX_EXT0_START + 212) +#define HID_MACRO_LB_EVENT (HID_SVX_EXT0_START + 213) +#define HID_MACRO_GROUP (HID_SVX_EXT0_START + 214) +#define HID_MACRO_MACROS (HID_SVX_EXT0_START + 215) +#define HID_MACROCHECKDIALOG (HID_SVX_EXT0_START + 216) +#define HID_MACRO_HEADERTABLISTBOX (HID_SVX_EXT0_START + 217) + // please adjust ACT_SVX_HID_END2 below if you add entries here! // ----------------------------------------------------------------------- @@ -820,7 +831,7 @@ #error Resource-Ueberlauf in #line, #file #endif -#define ACT_SVX_HID_END2 HID_SPLDLG_BUTTON_IGNORERULE +#define ACT_SVX_HID_END2 (HID_SVX_EXT0_START + 215) #if ACT_SVX_HID_END2 > HID_SVX_EXT0_END #error resource overrun in #line, #file #endif diff --git a/svx/inc/svx/brshitem.hxx b/svx/inc/svx/brshitem.hxx index 2f6c21670f92..f418a54fbe55 100644 --- a/svx/inc/svx/brshitem.hxx +++ b/svx/inc/svx/brshitem.hxx @@ -62,6 +62,9 @@ enum SvxGraphicPosition GPOS_AREA, GPOS_TILED }; +#define PARA_DEST_PARA 0 +#define PARA_DEST_CHAR 1 + class SvxBrushItem_Impl; class SVX_DLLPUBLIC SvxBrushItem : public SfxPoolItem { diff --git a/svx/inc/svx/charmap.hxx b/svx/inc/svx/charmap.hxx index a61762de22d6..304e67c5a5f0 100644 --- a/svx/inc/svx/charmap.hxx +++ b/svx/inc/svx/charmap.hxx @@ -35,27 +35,13 @@ #include <vcl/ctrl.hxx> #include <vcl/metric.hxx> #include <vcl/scrbar.hxx> -#include <sfx2/basedlgs.hxx> #include <map> #include <tools/shl.hxx> //add CHINA001 #include <tools/debug.hxx> //add CHINA001 -#include <vcl/sound.hxx> //add CHINA001 -#include <vcl/svapp.hxx> //add CHINA001 -#ifndef _SV_BUTTON_HXX -#include <vcl/button.hxx> //add CHINA001 -#endif -#include <vcl/fixed.hxx> //add CHINA001 -#include <vcl/lstbox.hxx> //add CHINA001 -#include <vcl/edit.hxx> //add CHINA001 -#include <vcl/metric.hxx> #include "svx/svxdllapi.h" -class SubsetMap; -class SvxCharMapData; - // define ---------------------------------------------------------------- -#define CHARMAP_MAXLEN 32 #define COLUMN_COUNT 16 #define ROW_COUNT 8 @@ -86,6 +72,7 @@ public: void SetHighlightHdl( const Link& rHdl ) { aHighHdl = rHdl; } Link GetPreSelectHdl() const { return aHighHdl; } void SetPreSelectHdl( const Link& rHdl ) { aPreSelectHdl = rHdl; } + static sal_uInt32& getSelectedChar(); #ifdef _SVX_CHARMAP_CXX_ ::svx::SvxShowCharSetItem* ImplGetItem( int _nPos ); @@ -149,71 +136,8 @@ private: void InitSettings( BOOL bForeground, BOOL bBackground); // abstraction layers are: Unicode<->MapIndex<->Pixel Point MapIndexToPixel( int) const; -//#if 0 // _SOLAR__PRIVATE DECL_LINK( VscrollHdl, ScrollBar* ); -//#endif -}; - -// class SvxShowText ===================================================== - -class SVX_DLLPUBLIC SvxShowText : public Control -{ -public: - SvxShowText( Window* pParent, - const ResId& rResId, - BOOL bCenter = FALSE ); - ~SvxShowText(); - - void SetFont( const Font& rFont ); - void SetText( const String& rText ); - -protected: - virtual void Paint( const Rectangle& ); - -private: - long mnY; - BOOL mbCenter; - }; -class SVX_DLLPUBLIC SvxCharMapData -{ -public: - SvxCharMapData( class SfxModalDialog* pDialog, BOOL bOne_, ResMgr* pResContext ); - - void SetCharFont( const Font& rFont ); - -private: -friend class SvxCharacterMap; - SfxModalDialog* mpDialog; - - SvxShowCharSet aShowSet; -// Edit aShowText; - SvxShowText aShowText; - OKButton aOKBtn; - CancelButton aCancelBtn; - HelpButton aHelpBtn; - PushButton aDeleteBtn; - FixedText aFontText; - ListBox aFontLB; - FixedText aSubsetText; - ListBox aSubsetLB; - FixedText aSymbolText; - SvxShowText aShowChar; - FixedText aCharCodeText; - - Font aFont; - BOOL bOne; - const SubsetMap* pSubsetMap; - - DECL_LINK( OKHdl, OKButton* ); - DECL_LINK( FontSelectHdl, ListBox* ); - DECL_LINK( SubsetSelectHdl, ListBox* ); - DECL_LINK( CharDoubleClickHdl, Control* pControl ); - DECL_LINK( CharSelectHdl, Control* pControl ); - DECL_LINK( CharHighlightHdl, Control* pControl ); - DECL_LINK( CharPreSelectHdl, Control* pControl ); - DECL_LINK( DeleteHdl, PushButton* pBtn ); -}; #endif diff --git a/svx/inc/svx/dialogs.hrc b/svx/inc/svx/dialogs.hrc index 448973fa525c..d19518fbcd88 100644 --- a/svx/inc/svx/dialogs.hrc +++ b/svx/inc/svx/dialogs.hrc @@ -38,7 +38,7 @@ // Resource-Id's ------------------------------------------------------------ // Bitte FIRSTFREE pflegen!!! (gilt nicht f"ur Strings) -#define RID_SVX_FIRSTFREE 303 +#define RID_SVX_FIRSTFREE 305 // ResId fuer die Hintergrund-TabPage #define RID_SVXPAGE_BACKGROUND (RID_SVX_START + 1) @@ -436,6 +436,8 @@ #define RID_SVXDLG_SECURITY_OPTIONS (RID_SVX_START + 300) #define RID_SVXDLG_WEBCONNECTION_INFO (RID_SVX_START + 301) #define RID_SVXPAGE_IMPROVEMENT (RID_SVX_START + 302) +#define RID_SVXPAGE_EVENTASSIGN (RID_SVX_START + 303) +#define RID_SVXPAGE_CONFIGGROUPBOX (RID_SVX_START + 304) // !!! please update RID_SVX_FIRSTFREE !!! see line 46 // Strings ------------------------------------------------------------------ diff --git a/svx/inc/svx/svxdlg.hxx b/svx/inc/svx/svxdlg.hxx index 6a8785823aba..233c7956f18a 100644 --- a/svx/inc/svx/svxdlg.hxx +++ b/svx/inc/svx/svxdlg.hxx @@ -63,6 +63,8 @@ class Graphic; class SdrObject; namespace svx{ class SpellDialogChildWindow;} +#define EMPTY_FRAME_REF com::sun::star::uno::Reference < com::sun::star::frame::XFrame >() + //#define SVX_DIALOGFACTORY_CLASSID 0xf8e5fd97, 0x49e2, 0x4ae5, 0xac, 0x31, 0x4, 0xcb, 0xf7, 0xf3, 0xcf, 0x69 class AbstractSvxDistributeDialog :public VclAbstractDialog //add for SvxDistributeDialog { @@ -177,22 +179,6 @@ public: virtual void Invalidate( USHORT nFlags = 0 ) = 0; }; -class AbstractSvxCharacterMap :public VclAbstractDialog //add for SvxCharacterMap -{ -public: - virtual void SetText( const XubString& rStr )=0; //From class Window - virtual void DisableFontSelection()=0; - - virtual const Font& GetCharFont() const =0; - virtual void SetCharFont( const Font& rFont )=0; - virtual void SetFont( const Font& rFont ) =0; - - virtual void SetChar( sal_Unicode c )=0; - virtual sal_Unicode GetChar() const=0; - - virtual String GetCharacters() const=0; -}; - class AbstractSvxSearchFormatDialog : public SfxAbstractTabDialog //for SvxSearchFormatDialog { public: @@ -421,13 +407,9 @@ public: virtual AbstractURLDlg * CreateURLDialog( Window* pParent, const String& rURL, const String& rAltText, const String& rDescription, const String& rTarget, const String& rName, - TargetList& rTargetList, - sal_uInt32 nResId) = 0; + TargetList& rTargetList ) = 0; virtual AbstractSvxHlinkDlgMarkWnd* CreateSvxHlinkDlgMarkWndDialog( SvxHyperlinkTabPageBase* pParent, sal_uInt32 nResId ) =0; //add for SvxHlinkDlgMarkWnd - virtual AbstractSvxCharacterMap * CreateSvxCharacterMap( Window* pParent, //add for SvxCharacterMap - sal_uInt32 nResId, - BOOL bOne = TRUE ) = 0; virtual SfxAbstractTabDialog* CreateTabItemDialog( Window* pParent, //add for SvxSearchFormatDialog const SfxItemSet& rSet, sal_uInt32 nResId) = 0; @@ -518,11 +500,17 @@ public: sal_uInt32 nResId, const SdrObject* pObj = NULL, BOOL bHasObj = TRUE )=0; - virtual AbstractSfxSingleTabDialog* CreateSfxSingleTabDialog( Window* pParent, //add for SvxMeasureDialog & SvxConnectionDialog + virtual VclAbstractDialog* CreateSfxDialog( Window* pParent, const SfxBindings& rBindings, sal_uInt32 nResId ) = 0; + virtual SfxAbstractDialog* CreateSfxDialog( Window* pParent, //add for SvxMeasureDialog & SvxConnectionDialog const SfxItemSet& rAttr, const SdrView* pView, sal_uInt32 nResId )=0; + virtual SfxAbstractDialog* CreateSfxDialog( Window* pParent, //add for SvxMeasureDialog & SvxConnectionDialog + const SfxItemSet& rAttr, + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxFrame, + sal_uInt32 nResId + )=0; virtual AbstractSvxPostItDialog* CreateSvxPostItDialog( Window* pParent, //add for SvxPostItDialog const SfxItemSet& rCoreSet, sal_uInt32 nResId, diff --git a/svx/inc/svx/xflbckit.hxx b/svx/inc/svx/xflbckit.hxx index 9edcd00efab6..8f4de04218df 100644 --- a/svx/inc/svx/xflbckit.hxx +++ b/svx/inc/svx/xflbckit.hxx @@ -31,9 +31,8 @@ #ifndef _SVX_XFLBCKIT_HXX #define _SVX_XFLBCKIT_HXX -#ifndef _SFXINTITEM_HXX //autogen #include <svtools/eitem.hxx> -#endif +#include "svx/svxdllapi.h" /************************************************************************* |* @@ -41,7 +40,7 @@ |* \************************************************************************/ -class XFillBackgroundItem : public SfxBoolItem +class SVX_DLLPUBLIC XFillBackgroundItem : public SfxBoolItem { public: TYPEINFO(); diff --git a/svx/inc/svx/xflbmpit.hxx b/svx/inc/svx/xflbmpit.hxx index 8a0389a0b227..ff15f038dcd3 100644 --- a/svx/inc/svx/xflbmpit.hxx +++ b/svx/inc/svx/xflbmpit.hxx @@ -32,6 +32,7 @@ #define _SVX_XFLBMPIT_HXX #include <svtools/eitem.hxx> +#include "svx/svxdllapi.h" /************************************************************************* |* @@ -39,7 +40,7 @@ |* \************************************************************************/ -class XFillBmpPosItem : public SfxEnumItem +class SVX_DLLPUBLIC XFillBmpPosItem : public SfxEnumItem { public: TYPEINFO(); diff --git a/svx/inc/svx/xflbmsli.hxx b/svx/inc/svx/xflbmsli.hxx index 655fda040d71..f57f4dc811d1 100644 --- a/svx/inc/svx/xflbmsli.hxx +++ b/svx/inc/svx/xflbmsli.hxx @@ -32,6 +32,7 @@ #define _SVX_XFLBMSLI_HXX #include <svtools/eitem.hxx> +#include "svx/svxdllapi.h" /************************************************************************* |* @@ -39,7 +40,7 @@ |* \************************************************************************/ -class XFillBmpSizeLogItem : public SfxBoolItem +class SVX_DLLPUBLIC XFillBmpSizeLogItem : public SfxBoolItem { public: TYPEINFO(); diff --git a/svx/inc/svx/xflbmsxy.hxx b/svx/inc/svx/xflbmsxy.hxx index c05db28de075..c9da8290daa0 100644 --- a/svx/inc/svx/xflbmsxy.hxx +++ b/svx/inc/svx/xflbmsxy.hxx @@ -32,6 +32,7 @@ #define _SVX_XFLBMSXY_HXX #include <svtools/metitem.hxx> +#include "svx/svxdllapi.h" /************************************************************************* |* @@ -39,7 +40,7 @@ |* \************************************************************************/ -class XFillBmpSizeXItem : public SfxMetricItem +class SVX_DLLPUBLIC XFillBmpSizeXItem : public SfxMetricItem { public: TYPEINFO(); @@ -66,7 +67,7 @@ public: |* \************************************************************************/ -class XFillBmpSizeYItem : public SfxMetricItem +class SVX_DLLPUBLIC XFillBmpSizeYItem : public SfxMetricItem { public: TYPEINFO(); diff --git a/svx/inc/svx/xflboxy.hxx b/svx/inc/svx/xflboxy.hxx index e1a15b63954d..6e9024399ef0 100644 --- a/svx/inc/svx/xflboxy.hxx +++ b/svx/inc/svx/xflboxy.hxx @@ -32,6 +32,7 @@ #define _SVX_XFLBOXY_HXX #include <svtools/intitem.hxx> +#include "svx/svxdllapi.h" /************************************************************************* |* @@ -39,7 +40,7 @@ |* \************************************************************************/ -class XFillBmpPosOffsetXItem : public SfxUInt16Item +class SVX_DLLPUBLIC XFillBmpPosOffsetXItem : public SfxUInt16Item { public: TYPEINFO(); @@ -62,7 +63,7 @@ public: |* \************************************************************************/ -class XFillBmpPosOffsetYItem : public SfxUInt16Item +class SVX_DLLPUBLIC XFillBmpPosOffsetYItem : public SfxUInt16Item { public: TYPEINFO(); diff --git a/svx/inc/svx/xflbtoxy.hxx b/svx/inc/svx/xflbtoxy.hxx index e2ede86f6bd4..e01eb79ff146 100644 --- a/svx/inc/svx/xflbtoxy.hxx +++ b/svx/inc/svx/xflbtoxy.hxx @@ -32,6 +32,7 @@ #define _SVX_XFLBTOXY_HXX #include <svtools/intitem.hxx> +#include "svx/svxdllapi.h" /************************************************************************* |* @@ -39,7 +40,7 @@ |* \************************************************************************/ -class XFillBmpTileOffsetXItem : public SfxUInt16Item +class SVX_DLLPUBLIC XFillBmpTileOffsetXItem : public SfxUInt16Item { public: TYPEINFO(); @@ -62,7 +63,7 @@ public: |* \************************************************************************/ -class XFillBmpTileOffsetYItem : public SfxUInt16Item +class SVX_DLLPUBLIC XFillBmpTileOffsetYItem : public SfxUInt16Item { public: TYPEINFO(); diff --git a/svx/prj/build.lst b/svx/prj/build.lst index 44dc3e17409e..51d1217ceae8 100644 --- a/svx/prj/build.lst +++ b/svx/prj/build.lst @@ -14,7 +14,6 @@ sx svx\source\unodialogs\textconversiondlgs nmake - all sx_textconversiondlgs sx svx\sdi nmake - all sx_sdi sx_inc NULL sx svx\source\src nmake - all sx_src sx_inc sx_sdi NULL sx svx\source\intro nmake - all sx_intro sx_inc NULL -sx svx\source\init nmake - all sx_init sx_inc NULL sx svx\source\items nmake - all sx_items sx_inc sx_sdi NULL sx svx\source\xoutdev nmake - all sx_xout sx_items sx_inc NULL sx svx\source\editeng nmake - all sx_eeng sx_inc NULL @@ -38,7 +37,7 @@ sx svx\source\form nmake - all sx_form sx_sdi sx_inc NULL sx svx\source\fmcomp nmake - all sx_fmcmp sx_sdi sx_inc NULL sx svx\source\tbxctrls nmake - all sx_tbxc sx_inc NULL sx svx\source\options nmake - all sx_opt sx_inc NULL -sx svx\source\dialog nmake - all sx_dlg sx_inc NULL +sx svx\source\dialog nmake - all sx_dlg sx_inc NULL sx svx\source\svrtf nmake - all sx_rtf sx_inc NULL sx svx\source\unodraw nmake - all sx_undrw sx_inc NULL sx svx\source\unoedit nmake - all sx_unedt sx_inc NULL @@ -49,5 +48,6 @@ sx svx\source\xml nmake - all sx_xml sx_inc NULL sx svx\source\accessibility nmake - all sx_accessibility sx_inc NULL sx svx\source\customshapes nmake - all sx_customshapes sx_inc NULL sx svx\source\toolbars nmake - all sx_toolbars sx_inc NULL -sx svx\util nmake - all sx_util sx_3deng sx_dlg sx_draw sx_attribute sx_properties sx_contact sx_event sx_animation sx_primitive2d sx_primitive3d sx_overlay sx_eeng sx_fmcmp sx_form sx_gall sx_items sx_link sx_mnuc sx_msfilt sx_opt sx_outl sx_rtf sx_sdi sx_stbc sx_tbxc sx_undrw sx_unedt sx_ungal sx_xml sx_xout sx_accessibility sx_intro sx_init sx_customshapes sx_toolbars sx_table sx_smarttags NULL +sx svx\source\cui nmake - all sx_cui sx_inc NULL +sx svx\util nmake - all sx_util sx_cui sx_3deng sx_dlg sx_draw sx_attribute sx_properties sx_contact sx_event sx_animation sx_primitive2d sx_primitive3d sx_overlay sx_eeng sx_fmcmp sx_form sx_gall sx_items sx_link sx_mnuc sx_msfilt sx_opt sx_outl sx_rtf sx_sdi sx_stbc sx_tbxc sx_undrw sx_unedt sx_ungal sx_xml sx_xout sx_accessibility sx_intro sx_customshapes sx_toolbars sx_table sx_smarttags NULL sx svx\source\gengal nmake - all sx_gengal sx_util NULL diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi index 2eb7c21353e4..a69aae4cf9fd 100644 --- a/svx/sdi/svx.sdi +++ b/svx/sdi/svx.sdi @@ -6268,7 +6268,7 @@ SfxVoidItem InsertSound SID_INSERT_SOUND //-------------------------------------------------------------------------- SfxVoidItem InsertSymbol SID_CHARMAP -(SvxFontItem Font SID_CHARMAP,SfxStringItem Symbols SID_ATTR_SPECIALCHAR) +(SfxStringItem Symbols SID_CHARMAP, SfxStringItem FontName SID_ATTR_SPECIALCHAR) [ /* flags: */ AutoUpdate = FALSE, diff --git a/svx/source/dialog/ControlFocusHelper.hxx b/svx/source/cui/ControlFocusHelper.hxx index 828341da0e71..828341da0e71 100644 --- a/svx/source/dialog/ControlFocusHelper.hxx +++ b/svx/source/cui/ControlFocusHelper.hxx diff --git a/svx/source/dialog/SpellAttrib.cxx b/svx/source/cui/SpellAttrib.cxx index 3614c40c1370..3614c40c1370 100644 --- a/svx/source/dialog/SpellAttrib.cxx +++ b/svx/source/cui/SpellAttrib.cxx diff --git a/svx/source/dialog/SpellAttrib.hxx b/svx/source/cui/SpellAttrib.hxx index ac2bb278c594..ac2bb278c594 100644 --- a/svx/source/dialog/SpellAttrib.hxx +++ b/svx/source/cui/SpellAttrib.hxx diff --git a/svx/source/dialog/SpellDialog.cxx b/svx/source/cui/SpellDialog.cxx index 3febb657ded2..3febb657ded2 100644 --- a/svx/source/dialog/SpellDialog.cxx +++ b/svx/source/cui/SpellDialog.cxx diff --git a/svx/source/dialog/SpellDialog.hrc b/svx/source/cui/SpellDialog.hrc index f571525a25db..f571525a25db 100644 --- a/svx/source/dialog/SpellDialog.hrc +++ b/svx/source/cui/SpellDialog.hrc diff --git a/svx/source/dialog/SpellDialog.src b/svx/source/cui/SpellDialog.src index f7cccd5febc2..f7cccd5febc2 100644 --- a/svx/source/dialog/SpellDialog.src +++ b/svx/source/cui/SpellDialog.src diff --git a/svx/source/cui/acccfg.cxx b/svx/source/cui/acccfg.cxx new file mode 100644 index 000000000000..e99fe145c09b --- /dev/null +++ b/svx/source/cui/acccfg.cxx @@ -0,0 +1,1700 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: acccfg.cxx,v $ + * $Revision: 1.40 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_svx.hxx" + +//----------------------------------------------- +// include own files + +#include "acccfg.hxx" +#include "cfgutil.hxx" +#include <svx/dialmgr.hxx> + +#include <sfx2/msg.hxx> +#include <sfx2/macrconf.hxx> +#include <sfx2/app.hxx> +#include <sfx2/filedlghelper.hxx> +#include <sfx2/minfitem.hxx> +#include <svtools/stritem.hxx> + +#include "svx/dialogs.hrc" +#include "acccfg.hrc" + +//----------------------------------------------- +// include interface declarations +#include <com/sun/star/frame/XFramesSupplier.hpp> +#include <com/sun/star/frame/XFrame.hpp> +#include <com/sun/star/frame/XController.hpp> +#include <com/sun/star/frame/XModel.hpp> +#include <com/sun/star/form/XReset.hpp> +#include <com/sun/star/frame/XModuleManager.hpp> +#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp> +#include <com/sun/star/frame/XModuleManager.hpp> + +#ifndef _COM_SUN_STAR_UI_XUICONFIGURATIONMANAGERSUPLLIER_HPP_ +#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp> +#endif +#include <com/sun/star/ui/XUIConfigurationManager.hpp> +#include <com/sun/star/awt/KeyModifier.hpp> +#include <com/sun/star/embed/XTransactedObject.hpp> +#include <com/sun/star/embed/ElementModes.hpp> + +#include <com/sun/star/ui/dialogs/TemplateDescription.hpp> + +//----------------------------------------------- +// include other projects +#include <unotools/processfactory.hxx> +#include <svtools/acceleratorexecute.hxx> +#include <comphelper/processfactory.hxx> +#include <svtools/svlbitm.hxx> +#include <vcl/svapp.hxx> +#include <vcl/help.hxx> +#include <rtl/ustrbuf.hxx> +#include <comphelper/sequenceashashmap.hxx> + +//----------------------------------------------- +// namespaces + +#ifdef css + #error "ambigous praeprozessor directive for css ..." +#else + namespace css = ::com::sun::star; +#endif + +using namespace com::sun::star; + +//----------------------------------------------- +// definitions + +//----------------------------------------------- +static ::rtl::OUString SERVICE_STORAGEFACTORY = ::rtl::OUString::createFromAscii("com.sun.star.embed.StorageFactory" ); +static ::rtl::OUString SERVICE_UICONFIGMGR = ::rtl::OUString::createFromAscii("com.sun.star.ui.UIConfigurationManager" ); +static ::rtl::OUString SERVICE_DESKTOP = ::rtl::OUString::createFromAscii("com.sun.star.frame.Desktop" ); +static ::rtl::OUString SERVICE_MODULEMANAGER = ::rtl::OUString::createFromAscii("com.sun.star.frame.ModuleManager" ); +static ::rtl::OUString SERVICE_GLOBALACCCFG = ::rtl::OUString::createFromAscii("com.sun.star.ui.GlobalAcceleratorConfiguration" ); +static ::rtl::OUString SERVICE_MODULEUICONFIGSUPPLIER = ::rtl::OUString::createFromAscii("com.sun.star.ui.ModuleUIConfigurationManagerSupplier"); +static ::rtl::OUString SERVICE_UICMDDESCRIPTION = ::rtl::OUString::createFromAscii("com.sun.star.frame.UICommandDescription" ); + +static ::rtl::OUString MODULEPROP_SHORTNAME = ::rtl::OUString::createFromAscii("ooSetupFactoryShortName" ); +static ::rtl::OUString MODULEPROP_UINAME = ::rtl::OUString::createFromAscii("ooSetupFactoryUIName" ); +static ::rtl::OUString CMDPROP_UINAME = ::rtl::OUString::createFromAscii("Name" ); + +static ::rtl::OUString FOLDERNAME_UICONFIG = ::rtl::OUString::createFromAscii("Configurations2" ); + +static ::rtl::OUString MEDIATYPE_PROPNAME = ::rtl::OUString::createFromAscii("MediaType" ); +static ::rtl::OUString MEDIATYPE_UICONFIG = ::rtl::OUString::createFromAscii("application/vnd.sun.xml.ui.configuration" ); + +//----------------------------------------------- +static USHORT __FAR_DATA KEYCODE_ARRAY[] = +{ + KEY_F1 , + KEY_F2 , + KEY_F3 , + KEY_F4 , + KEY_F5 , + KEY_F6 , + KEY_F7 , + KEY_F8 , + KEY_F9 , + KEY_F10 , + KEY_F11 , + KEY_F12 , + + KEY_DOWN , + KEY_UP , + KEY_LEFT , + KEY_RIGHT , + KEY_HOME , + KEY_END , + KEY_PAGEUP , + KEY_PAGEDOWN , + KEY_RETURN , + KEY_ESCAPE , + KEY_BACKSPACE, + KEY_INSERT , + KEY_DELETE , + + KEY_OPEN , + KEY_CUT , + KEY_COPY , + KEY_PASTE , + KEY_UNDO , + KEY_REPEAT , + KEY_FIND , + KEY_PROPERTIES , + KEY_FRONT , + KEY_CONTEXTMENU , + KEY_MENU , + KEY_HELP , + + KEY_F1 | KEY_SHIFT, + KEY_F2 | KEY_SHIFT, + KEY_F3 | KEY_SHIFT, + KEY_F4 | KEY_SHIFT, + KEY_F5 | KEY_SHIFT, + KEY_F6 | KEY_SHIFT, + KEY_F7 | KEY_SHIFT, + KEY_F8 | KEY_SHIFT, + KEY_F9 | KEY_SHIFT, + KEY_F10 | KEY_SHIFT, + KEY_F11 | KEY_SHIFT, + KEY_F12 | KEY_SHIFT, + + KEY_DOWN | KEY_SHIFT, + KEY_UP | KEY_SHIFT, + KEY_LEFT | KEY_SHIFT, + KEY_RIGHT | KEY_SHIFT, + KEY_HOME | KEY_SHIFT, + KEY_END | KEY_SHIFT, + KEY_PAGEUP | KEY_SHIFT, + KEY_PAGEDOWN | KEY_SHIFT, + KEY_RETURN | KEY_SHIFT, + KEY_SPACE | KEY_SHIFT, + KEY_ESCAPE | KEY_SHIFT, + KEY_BACKSPACE | KEY_SHIFT, + KEY_INSERT | KEY_SHIFT, + KEY_DELETE | KEY_SHIFT, + + KEY_0 | KEY_MOD1 , + KEY_1 | KEY_MOD1 , + KEY_2 | KEY_MOD1 , + KEY_3 | KEY_MOD1 , + KEY_4 | KEY_MOD1 , + KEY_5 | KEY_MOD1 , + KEY_6 | KEY_MOD1 , + KEY_7 | KEY_MOD1 , + KEY_8 | KEY_MOD1 , + KEY_9 | KEY_MOD1 , + KEY_A | KEY_MOD1 , + KEY_B | KEY_MOD1 , + KEY_C | KEY_MOD1 , + KEY_D | KEY_MOD1 , + KEY_E | KEY_MOD1 , + KEY_F | KEY_MOD1 , + KEY_G | KEY_MOD1 , + KEY_H | KEY_MOD1 , + KEY_I | KEY_MOD1 , + KEY_J | KEY_MOD1 , + KEY_K | KEY_MOD1 , + KEY_L | KEY_MOD1 , + KEY_M | KEY_MOD1 , + KEY_N | KEY_MOD1 , + KEY_O | KEY_MOD1 , + KEY_P | KEY_MOD1 , + KEY_Q | KEY_MOD1 , + KEY_R | KEY_MOD1 , + KEY_S | KEY_MOD1 , + KEY_T | KEY_MOD1 , + KEY_U | KEY_MOD1 , + KEY_V | KEY_MOD1 , + KEY_W | KEY_MOD1 , + KEY_X | KEY_MOD1 , + KEY_Y | KEY_MOD1 , + KEY_Z | KEY_MOD1 , + + KEY_F1 | KEY_MOD1 , + KEY_F2 | KEY_MOD1 , + KEY_F3 | KEY_MOD1 , + KEY_F4 | KEY_MOD1 , + KEY_F5 | KEY_MOD1 , + KEY_F6 | KEY_MOD1 , + KEY_F7 | KEY_MOD1 , + KEY_F8 | KEY_MOD1 , + KEY_F9 | KEY_MOD1 , + KEY_F10 | KEY_MOD1 , + KEY_F11 | KEY_MOD1 , + KEY_F12 | KEY_MOD1 , + + KEY_DOWN | KEY_MOD1 , + KEY_UP | KEY_MOD1 , + KEY_LEFT | KEY_MOD1 , + KEY_RIGHT | KEY_MOD1 , + KEY_HOME | KEY_MOD1 , + KEY_END | KEY_MOD1 , + KEY_PAGEUP | KEY_MOD1 , + KEY_PAGEDOWN | KEY_MOD1 , + KEY_RETURN | KEY_MOD1 , + KEY_SPACE | KEY_MOD1 , + KEY_BACKSPACE | KEY_MOD1 , + KEY_INSERT | KEY_MOD1 , + KEY_DELETE | KEY_MOD1 , + + KEY_ADD | KEY_MOD1 , + KEY_SUBTRACT | KEY_MOD1 , + KEY_MULTIPLY | KEY_MOD1 , + KEY_DIVIDE | KEY_MOD1 , + + KEY_0 | KEY_SHIFT | KEY_MOD1, + KEY_1 | KEY_SHIFT | KEY_MOD1, + KEY_2 | KEY_SHIFT | KEY_MOD1, + KEY_3 | KEY_SHIFT | KEY_MOD1, + KEY_4 | KEY_SHIFT | KEY_MOD1, + KEY_5 | KEY_SHIFT | KEY_MOD1, + KEY_6 | KEY_SHIFT | KEY_MOD1, + KEY_7 | KEY_SHIFT | KEY_MOD1, + KEY_8 | KEY_SHIFT | KEY_MOD1, + KEY_9 | KEY_SHIFT | KEY_MOD1, + KEY_A | KEY_SHIFT | KEY_MOD1, + KEY_B | KEY_SHIFT | KEY_MOD1, + KEY_C | KEY_SHIFT | KEY_MOD1, + KEY_D | KEY_SHIFT | KEY_MOD1, + KEY_E | KEY_SHIFT | KEY_MOD1, + KEY_F | KEY_SHIFT | KEY_MOD1, + KEY_G | KEY_SHIFT | KEY_MOD1, + KEY_H | KEY_SHIFT | KEY_MOD1, + KEY_I | KEY_SHIFT | KEY_MOD1, + KEY_J | KEY_SHIFT | KEY_MOD1, + KEY_K | KEY_SHIFT | KEY_MOD1, + KEY_L | KEY_SHIFT | KEY_MOD1, + KEY_M | KEY_SHIFT | KEY_MOD1, + KEY_N | KEY_SHIFT | KEY_MOD1, + KEY_O | KEY_SHIFT | KEY_MOD1, + KEY_P | KEY_SHIFT | KEY_MOD1, + KEY_Q | KEY_SHIFT | KEY_MOD1, + KEY_R | KEY_SHIFT | KEY_MOD1, + KEY_S | KEY_SHIFT | KEY_MOD1, + KEY_T | KEY_SHIFT | KEY_MOD1, + KEY_U | KEY_SHIFT | KEY_MOD1, + KEY_V | KEY_SHIFT | KEY_MOD1, + KEY_W | KEY_SHIFT | KEY_MOD1, + KEY_X | KEY_SHIFT | KEY_MOD1, + KEY_Y | KEY_SHIFT | KEY_MOD1, + KEY_Z | KEY_SHIFT | KEY_MOD1, + + KEY_F1 | KEY_SHIFT | KEY_MOD1, + KEY_F2 | KEY_SHIFT | KEY_MOD1, + KEY_F3 | KEY_SHIFT | KEY_MOD1, + KEY_F4 | KEY_SHIFT | KEY_MOD1, + KEY_F5 | KEY_SHIFT | KEY_MOD1, + KEY_F6 | KEY_SHIFT | KEY_MOD1, + KEY_F7 | KEY_SHIFT | KEY_MOD1, + KEY_F8 | KEY_SHIFT | KEY_MOD1, + KEY_F9 | KEY_SHIFT | KEY_MOD1, + KEY_F10 | KEY_SHIFT | KEY_MOD1, + KEY_F11 | KEY_SHIFT | KEY_MOD1, + KEY_F12 | KEY_SHIFT | KEY_MOD1, + + KEY_DOWN | KEY_SHIFT | KEY_MOD1, + KEY_UP | KEY_SHIFT | KEY_MOD1, + KEY_LEFT | KEY_SHIFT | KEY_MOD1, + KEY_RIGHT | KEY_SHIFT | KEY_MOD1, + KEY_HOME | KEY_SHIFT | KEY_MOD1, + KEY_END | KEY_SHIFT | KEY_MOD1, + KEY_PAGEUP | KEY_SHIFT | KEY_MOD1, + KEY_PAGEDOWN | KEY_SHIFT | KEY_MOD1, + KEY_RETURN | KEY_SHIFT | KEY_MOD1, + KEY_SPACE | KEY_SHIFT | KEY_MOD1, + KEY_BACKSPACE | KEY_SHIFT | KEY_MOD1, + KEY_INSERT | KEY_SHIFT | KEY_MOD1, + KEY_DELETE | KEY_SHIFT | KEY_MOD1, + + KEY_0 | KEY_MOD2 , + KEY_1 | KEY_MOD2 , + KEY_2 | KEY_MOD2 , + KEY_3 | KEY_MOD2 , + KEY_4 | KEY_MOD2 , + KEY_5 | KEY_MOD2 , + KEY_6 | KEY_MOD2 , + KEY_7 | KEY_MOD2 , + KEY_8 | KEY_MOD2 , + KEY_9 | KEY_MOD2 , + KEY_A | KEY_MOD2 , + KEY_B | KEY_MOD2 , + KEY_C | KEY_MOD2 , + KEY_D | KEY_MOD2 , + KEY_E | KEY_MOD2 , + KEY_F | KEY_MOD2 , + KEY_G | KEY_MOD2 , + KEY_H | KEY_MOD2 , + KEY_I | KEY_MOD2 , + KEY_J | KEY_MOD2 , + KEY_K | KEY_MOD2 , + KEY_L | KEY_MOD2 , + KEY_M | KEY_MOD2 , + KEY_N | KEY_MOD2 , + KEY_O | KEY_MOD2 , + KEY_P | KEY_MOD2 , + KEY_Q | KEY_MOD2 , + KEY_R | KEY_MOD2 , + KEY_S | KEY_MOD2 , + KEY_T | KEY_MOD2 , + KEY_U | KEY_MOD2 , + KEY_V | KEY_MOD2 , + KEY_W | KEY_MOD2 , + KEY_X | KEY_MOD2 , + KEY_Y | KEY_MOD2 , + KEY_Z | KEY_MOD2 , + + KEY_F1 | KEY_MOD2 , + KEY_F2 | KEY_MOD2 , + KEY_F3 | KEY_MOD2 , + KEY_F4 | KEY_MOD2 , + KEY_F5 | KEY_MOD2 , + KEY_F6 | KEY_MOD2 , + KEY_F7 | KEY_MOD2 , + KEY_F8 | KEY_MOD2 , + KEY_F9 | KEY_MOD2 , + KEY_F10 | KEY_MOD2 , + KEY_F11 | KEY_MOD2 , + KEY_F12 | KEY_MOD2 , + + KEY_DOWN | KEY_MOD2 , + KEY_UP | KEY_MOD2 , + KEY_LEFT | KEY_MOD2 , + KEY_RIGHT | KEY_MOD2 , + KEY_HOME | KEY_MOD2 , + KEY_END | KEY_MOD2 , + KEY_PAGEUP | KEY_MOD2 , + KEY_PAGEDOWN | KEY_MOD2 , + KEY_RETURN | KEY_MOD2 , + KEY_SPACE | KEY_MOD2 , + KEY_BACKSPACE | KEY_MOD2 , + KEY_INSERT | KEY_MOD2 , + KEY_DELETE | KEY_MOD2 , + + KEY_0 | KEY_SHIFT | KEY_MOD2, + KEY_1 | KEY_SHIFT | KEY_MOD2, + KEY_2 | KEY_SHIFT | KEY_MOD2, + KEY_3 | KEY_SHIFT | KEY_MOD2, + KEY_4 | KEY_SHIFT | KEY_MOD2, + KEY_5 | KEY_SHIFT | KEY_MOD2, + KEY_6 | KEY_SHIFT | KEY_MOD2, + KEY_7 | KEY_SHIFT | KEY_MOD2, + KEY_8 | KEY_SHIFT | KEY_MOD2, + KEY_9 | KEY_SHIFT | KEY_MOD2, + KEY_A | KEY_SHIFT | KEY_MOD2, + KEY_B | KEY_SHIFT | KEY_MOD2, + KEY_C | KEY_SHIFT | KEY_MOD2, + KEY_D | KEY_SHIFT | KEY_MOD2, + KEY_E | KEY_SHIFT | KEY_MOD2, + KEY_F | KEY_SHIFT | KEY_MOD2, + KEY_G | KEY_SHIFT | KEY_MOD2, + KEY_H | KEY_SHIFT | KEY_MOD2, + KEY_I | KEY_SHIFT | KEY_MOD2, + KEY_J | KEY_SHIFT | KEY_MOD2, + KEY_K | KEY_SHIFT | KEY_MOD2, + KEY_L | KEY_SHIFT | KEY_MOD2, + KEY_M | KEY_SHIFT | KEY_MOD2, + KEY_N | KEY_SHIFT | KEY_MOD2, + KEY_O | KEY_SHIFT | KEY_MOD2, + KEY_P | KEY_SHIFT | KEY_MOD2, + KEY_Q | KEY_SHIFT | KEY_MOD2, + KEY_R | KEY_SHIFT | KEY_MOD2, + KEY_S | KEY_SHIFT | KEY_MOD2, + KEY_T | KEY_SHIFT | KEY_MOD2, + KEY_U | KEY_SHIFT | KEY_MOD2, + KEY_V | KEY_SHIFT | KEY_MOD2, + KEY_W | KEY_SHIFT | KEY_MOD2, + KEY_X | KEY_SHIFT | KEY_MOD2, + KEY_Y | KEY_SHIFT | KEY_MOD2, + KEY_Z | KEY_SHIFT | KEY_MOD2, + + KEY_F1 | KEY_SHIFT | KEY_MOD2, + KEY_F2 | KEY_SHIFT | KEY_MOD2, + KEY_F3 | KEY_SHIFT | KEY_MOD2, + KEY_F4 | KEY_SHIFT | KEY_MOD2, + KEY_F5 | KEY_SHIFT | KEY_MOD2, + KEY_F6 | KEY_SHIFT | KEY_MOD2, + KEY_F7 | KEY_SHIFT | KEY_MOD2, + KEY_F8 | KEY_SHIFT | KEY_MOD2, + KEY_F9 | KEY_SHIFT | KEY_MOD2, + KEY_F10 | KEY_SHIFT | KEY_MOD2, + KEY_F11 | KEY_SHIFT | KEY_MOD2, + KEY_F12 | KEY_SHIFT | KEY_MOD2, + + KEY_DOWN | KEY_SHIFT | KEY_MOD2, + KEY_UP | KEY_SHIFT | KEY_MOD2, + KEY_LEFT | KEY_SHIFT | KEY_MOD2, + KEY_RIGHT | KEY_SHIFT | KEY_MOD2, + KEY_HOME | KEY_SHIFT | KEY_MOD2, + KEY_END | KEY_SHIFT | KEY_MOD2, + KEY_PAGEUP | KEY_SHIFT | KEY_MOD2, + KEY_PAGEDOWN | KEY_SHIFT | KEY_MOD2, + KEY_RETURN | KEY_SHIFT | KEY_MOD2, + KEY_SPACE | KEY_SHIFT | KEY_MOD2, + KEY_BACKSPACE | KEY_SHIFT | KEY_MOD2, + KEY_INSERT | KEY_SHIFT | KEY_MOD2, + KEY_DELETE | KEY_SHIFT | KEY_MOD2, + + KEY_0 | KEY_MOD1 | KEY_MOD2 , + KEY_1 | KEY_MOD1 | KEY_MOD2 , + KEY_2 | KEY_MOD1 | KEY_MOD2 , + KEY_3 | KEY_MOD1 | KEY_MOD2 , + KEY_4 | KEY_MOD1 | KEY_MOD2 , + KEY_5 | KEY_MOD1 | KEY_MOD2 , + KEY_6 | KEY_MOD1 | KEY_MOD2 , + KEY_7 | KEY_MOD1 | KEY_MOD2 , + KEY_8 | KEY_MOD1 | KEY_MOD2 , + KEY_9 | KEY_MOD1 | KEY_MOD2 , + KEY_A | KEY_MOD1 | KEY_MOD2 , + KEY_B | KEY_MOD1 | KEY_MOD2 , + KEY_C | KEY_MOD1 | KEY_MOD2 , + KEY_D | KEY_MOD1 | KEY_MOD2 , + KEY_E | KEY_MOD1 | KEY_MOD2 , + KEY_F | KEY_MOD1 | KEY_MOD2 , + KEY_G | KEY_MOD1 | KEY_MOD2 , + KEY_H | KEY_MOD1 | KEY_MOD2 , + KEY_I | KEY_MOD1 | KEY_MOD2 , + KEY_J | KEY_MOD1 | KEY_MOD2 , + KEY_K | KEY_MOD1 | KEY_MOD2 , + KEY_L | KEY_MOD1 | KEY_MOD2 , + KEY_M | KEY_MOD1 | KEY_MOD2 , + KEY_N | KEY_MOD1 | KEY_MOD2 , + KEY_O | KEY_MOD1 | KEY_MOD2 , + KEY_P | KEY_MOD1 | KEY_MOD2 , + KEY_Q | KEY_MOD1 | KEY_MOD2 , + KEY_R | KEY_MOD1 | KEY_MOD2 , + KEY_S | KEY_MOD1 | KEY_MOD2 , + KEY_T | KEY_MOD1 | KEY_MOD2 , + KEY_U | KEY_MOD1 | KEY_MOD2 , + KEY_V | KEY_MOD1 | KEY_MOD2 , + KEY_W | KEY_MOD1 | KEY_MOD2 , + KEY_X | KEY_MOD1 | KEY_MOD2 , + KEY_Y | KEY_MOD1 | KEY_MOD2 , + KEY_Z | KEY_MOD1 | KEY_MOD2 , + + KEY_F1 | KEY_MOD1 | KEY_MOD2 , + KEY_F2 | KEY_MOD1 | KEY_MOD2 , + KEY_F3 | KEY_MOD1 | KEY_MOD2 , + KEY_F4 | KEY_MOD1 | KEY_MOD2 , + KEY_F5 | KEY_MOD1 | KEY_MOD2 , + KEY_F6 | KEY_MOD1 | KEY_MOD2 , + KEY_F7 | KEY_MOD1 | KEY_MOD2 , + KEY_F8 | KEY_MOD1 | KEY_MOD2 , + KEY_F9 | KEY_MOD1 | KEY_MOD2 , + KEY_F10 | KEY_MOD1 | KEY_MOD2 , + KEY_F11 | KEY_MOD1 | KEY_MOD2 , + KEY_F12 | KEY_MOD1 | KEY_MOD2 , + + KEY_DOWN | KEY_MOD1 | KEY_MOD2 , + KEY_UP | KEY_MOD1 | KEY_MOD2 , + KEY_LEFT | KEY_MOD1 | KEY_MOD2 , + KEY_RIGHT | KEY_MOD1 | KEY_MOD2 , + KEY_HOME | KEY_MOD1 | KEY_MOD2 , + KEY_END | KEY_MOD1 | KEY_MOD2 , + KEY_PAGEUP | KEY_MOD1 | KEY_MOD2 , + KEY_PAGEDOWN | KEY_MOD1 | KEY_MOD2 , + KEY_RETURN | KEY_MOD1 | KEY_MOD2 , + KEY_SPACE | KEY_MOD1 | KEY_MOD2 , + KEY_BACKSPACE | KEY_MOD1 | KEY_MOD2 , + KEY_INSERT | KEY_MOD1 | KEY_MOD2 , + KEY_DELETE | KEY_MOD1 | KEY_MOD2 , + + KEY_0 | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_1 | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_2 | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_3 | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_4 | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_5 | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_6 | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_7 | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_8 | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_9 | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_A | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_B | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_C | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_D | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_E | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_F | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_G | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_H | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_I | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_J | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_K | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_L | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_M | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_N | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_O | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_P | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_Q | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_R | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_S | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_T | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_U | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_V | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_W | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_X | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_Y | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_Z | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + + KEY_F1 | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_F2 | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_F3 | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_F4 | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_F5 | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_F6 | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_F7 | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_F8 | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_F9 | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_F10 | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_F11 | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_F12 | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + + KEY_DOWN | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_UP | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_LEFT | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_RIGHT | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_HOME | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_END | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_PAGEUP | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_PAGEDOWN | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_RETURN | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_SPACE | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_BACKSPACE | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_INSERT | KEY_SHIFT | KEY_MOD1 | KEY_MOD2, + KEY_DELETE | KEY_SHIFT | KEY_MOD1 | KEY_MOD2 +}; + +static USHORT KEYCODE_ARRAY_SIZE = (sizeof(KEYCODE_ARRAY) / sizeof(KEYCODE_ARRAY[0])); + +//----------------------------------------------- +// seems to be needed to layout the list box, which shows all +// assignable shortcuts +static long AccCfgTabs[] = +{ + 2, // Number of Tabs + 0, + 120 // Function +}; + +//----------------------------------------------- +class SfxAccCfgLBoxString_Impl : public SvLBoxString +{ + public: + SfxAccCfgLBoxString_Impl( SvLBoxEntry* pEntry, + USHORT nFlags, + const String& sText ); + + virtual ~SfxAccCfgLBoxString_Impl(); + + virtual void Paint(const Point& aPos , + SvLBox& rDevice, + USHORT nFlags , + SvLBoxEntry* pEntry ); +}; + +//----------------------------------------------- +SfxAccCfgLBoxString_Impl::SfxAccCfgLBoxString_Impl( SvLBoxEntry* pEntry, + USHORT nFlags, + const String& sText ) + : SvLBoxString(pEntry, nFlags, sText) +{ +} + +//----------------------------------------------- +SfxAccCfgLBoxString_Impl::~SfxAccCfgLBoxString_Impl() +{ +} + +//----------------------------------------------- +void SfxAccCfgLBoxString_Impl::Paint(const Point& aPos , + SvLBox& rDevice, + USHORT /*nFlags*/, + SvLBoxEntry* pEntry ) +{ + /*/ ??? realy needed !!! + Font aOldFont(rDevice.GetFont()); + Font aNewFont(aOldFont ); + rDevice.SetFont( aFont ); + */ + + if (!pEntry) + return; + + TAccInfo* pUserData = (TAccInfo*)pEntry->GetUserData(); + if (!pUserData) + return; + + if (pUserData->m_bIsConfigurable) + rDevice.DrawText(aPos, GetText()); + else + rDevice.DrawCtrlText(aPos, GetText(), 0, STRING_LEN, TEXT_DRAW_DISABLE); + + //rDev.SetFont( aOldFont ); +} + +//----------------------------------------------- +void SfxAccCfgTabListBox_Impl::InitEntry( SvLBoxEntry* pEntry , + const XubString& sText , + const Image& aImage1, + const Image& aImage2, + SvLBoxButtonKind eButtonKind) +{ + SvTabListBox::InitEntry(pEntry, sText, aImage1, aImage2, eButtonKind); +} + +//----------------------------------------------- +/** select the entry, which match the current key input ... excepting + keys, which are used for the dialog itself. + */ +void SfxAccCfgTabListBox_Impl::KeyInput(const KeyEvent& aKey) +{ + KeyCode aCode1 = aKey.GetKeyCode(); + USHORT nCode1 = aCode1.GetCode(); + USHORT nMod1 = aCode1.GetModifier(); + + // is it related to our list box ? + if ( + (nCode1 != KEY_DOWN ) && + (nCode1 != KEY_UP ) && + (nCode1 != KEY_LEFT ) && + (nCode1 != KEY_RIGHT ) && + (nCode1 != KEY_PAGEUP ) && + (nCode1 != KEY_PAGEDOWN) + ) + { + SvLBoxEntry* pEntry = First(); + while (pEntry) + { + TAccInfo* pUserData = (TAccInfo*)pEntry->GetUserData(); + if (pUserData) + { + USHORT nCode2 = pUserData->m_aKey.GetCode(); + USHORT nMod2 = pUserData->m_aKey.GetModifier(); + if ( + (nCode1 == nCode2) && + (nMod1 == nMod2 ) + ) + { + Select (pEntry); + MakeVisible(pEntry); + return; + } + } + pEntry = Next(pEntry); + } + } + + // no - handle it as normal dialog input + SvTabListBox::KeyInput(aKey); +} + +//----------------------------------------------- +SfxAcceleratorConfigPage::SfxAcceleratorConfigPage( Window* pParent, const SfxItemSet& aSet ) + : SfxTabPage (pParent, SVX_RES(RID_SVXPAGE_KEYBOARD), aSet) + , m_pMacroInfoItem () + , m_pStringItem () + , m_pFontItem () + , m_pFileDlg (NULL) + , aEntriesBox (this , this, SVX_RES(BOX_ACC_ENTRIES )) + , aKeyboardGroup (this , SVX_RES(GRP_ACC_KEYBOARD )) + , aOfficeButton (this , SVX_RES(RB_OFFICE )) + , aModuleButton (this , SVX_RES(RB_MODULE )) + , aChangeButton (this , SVX_RES(BTN_ACC_CHANGE )) + , aRemoveButton (this , SVX_RES(BTN_ACC_REMOVE )) + , aGroupText (this , SVX_RES(TXT_ACC_GROUP )) + , pGroupLBox(new SfxConfigGroupListBox_Impl( this, SVX_RES(BOX_ACC_GROUP), SFX_SLOT_ACCELCONFIG )) + , aFunctionText (this , SVX_RES(TXT_ACC_FUNCTION )) + , pFunctionBox(new SfxConfigFunctionListBox_Impl( this, SVX_RES( BOX_ACC_FUNCTION ))) + , aKeyText (this , SVX_RES(TXT_ACC_KEY )) + , aKeyBox (this , SVX_RES(BOX_ACC_KEY )) + , aFunctionsGroup (this , SVX_RES(GRP_ACC_FUNCTIONS )) + , aLoadButton (this , SVX_RES(BTN_LOAD )) + , aSaveButton (this , SVX_RES(BTN_SAVE )) + , aResetButton (this , SVX_RES(BTN_RESET )) + , aLoadAccelConfigStr ( SVX_RES( STR_LOADACCELCONFIG ) ) + , aSaveAccelConfigStr ( SVX_RES( STR_SAVEACCELCONFIG ) ) + , aFilterAllStr ( SVX_RES( STR_SFX_FILTERNAME_ALL ) ) + , aFilterCfgStr ( SVX_RES( STR_FILTERNAME_CFG ) ) + , m_bStylesInfoInitialized(sal_False) + , m_xGlobal () + , m_xModule () + , m_xAct () +{ + FreeResource(); + +// install handler functions + aChangeButton.SetClickHdl( LINK( this, SfxAcceleratorConfigPage, ChangeHdl )); + aRemoveButton.SetClickHdl( LINK( this, SfxAcceleratorConfigPage, RemoveHdl )); + aEntriesBox.SetSelectHdl ( LINK( this, SfxAcceleratorConfigPage, SelectHdl )); + pGroupLBox->SetSelectHdl ( LINK( this, SfxAcceleratorConfigPage, SelectHdl )); + pFunctionBox->SetSelectHdl( LINK( this, SfxAcceleratorConfigPage, SelectHdl )); + aKeyBox.SetSelectHdl ( LINK( this, SfxAcceleratorConfigPage, SelectHdl )); + aLoadButton.SetClickHdl ( LINK( this, SfxAcceleratorConfigPage, Load )); + aSaveButton.SetClickHdl ( LINK( this, SfxAcceleratorConfigPage, Save )); + aResetButton.SetClickHdl ( LINK( this, SfxAcceleratorConfigPage, Default )); + aOfficeButton.SetClickHdl( LINK( this, SfxAcceleratorConfigPage, RadioHdl )); + aModuleButton.SetClickHdl( LINK( this, SfxAcceleratorConfigPage, RadioHdl )); + + // initialize Entriesbox + aEntriesBox.SetWindowBits(WB_HSCROLL|WB_CLIPCHILDREN); + aEntriesBox.SetSelectionMode(SINGLE_SELECTION); + aEntriesBox.SetTabs(&AccCfgTabs[0], MAP_APPFONT); + aEntriesBox.Resize(); // OS: Hack for right selection + aEntriesBox.SetSpaceBetweenEntries(0); + aEntriesBox.SetDragDropMode(0); + + // detect max keyname width + long nMaxWidth = 0; + for ( USHORT i = 0; i < KEYCODE_ARRAY_SIZE; ++i ) + { + long nTmp = GetTextWidth( KeyCode( KEYCODE_ARRAY[i] ).GetName() ); + if ( nTmp > nMaxWidth ) + nMaxWidth = nTmp; + } + // recalc second tab + long nNewTab = PixelToLogic( Size( nMaxWidth, 0 ), MAP_APPFONT ).Width(); + nNewTab = nNewTab + 5; // additional space + aEntriesBox.SetTab( 1, nNewTab ); + + // initialize GroupBox + pGroupLBox->SetFunctionListBox(pFunctionBox); + + // initialize KeyBox + aKeyBox.SetWindowBits(WB_CLIPCHILDREN|WB_HSCROLL|WB_SORT); +} + +//----------------------------------------------- +SfxAcceleratorConfigPage::~SfxAcceleratorConfigPage() +{ + // free memory - remove all dynamic user data + SvLBoxEntry* pEntry = aEntriesBox.First(); + while (pEntry) + { + TAccInfo* pUserData = (TAccInfo*)pEntry->GetUserData(); + if (pUserData) + delete pUserData; + pEntry = aEntriesBox.Next(pEntry); + } + + pEntry = aKeyBox.First(); + while (pEntry) + { + TAccInfo* pUserData = (TAccInfo*)pEntry->GetUserData(); + if (pUserData) + delete pUserData; + pEntry = aKeyBox.Next(pEntry); + } + + aEntriesBox.Clear(); + aKeyBox.Clear(); + + delete m_pFileDlg; + delete pGroupLBox; + delete pFunctionBox; +} + +//----------------------------------------------- +void SfxAcceleratorConfigPage::InitAccCfg() +{ + // already initialized ? + if (m_xSMGR.is()) + return; // yes -> do nothing + + try + { + // no - initialize this instance + m_xSMGR = ::utl::getProcessServiceFactory(); + + m_xUICmdDescription = css::uno::Reference< css::container::XNameAccess >(m_xSMGR->createInstance(SERVICE_UICMDDESCRIPTION), css::uno::UNO_QUERY_THROW); + + // get the current active frame, which should be our "parent" + // for this session + m_xFrame = GetFrame(); + if ( !m_xFrame.is() ) + { + css::uno::Reference< css::frame::XFramesSupplier > xDesktop(m_xSMGR->createInstance(SERVICE_DESKTOP), css::uno::UNO_QUERY_THROW); + m_xFrame = xDesktop->getActiveFrame(); + } + + // identify module + css::uno::Reference< css::frame::XModuleManager > xModuleManager (m_xSMGR->createInstance(SERVICE_MODULEMANAGER), css::uno::UNO_QUERY_THROW); + css::uno::Reference< css::container::XNameAccess > xModuleManagerCont(xModuleManager , css::uno::UNO_QUERY_THROW); + m_sModuleLongName = xModuleManager->identify(m_xFrame); + ::comphelper::SequenceAsHashMap lModuleProps(xModuleManagerCont->getByName(m_sModuleLongName)); + m_sModuleShortName = lModuleProps.getUnpackedValueOrDefault(MODULEPROP_SHORTNAME, ::rtl::OUString()); + m_sModuleUIName = lModuleProps.getUnpackedValueOrDefault(MODULEPROP_UINAME , ::rtl::OUString()); + + // get global accelerator configuration + m_xGlobal = css::uno::Reference< css::ui::XAcceleratorConfiguration >(m_xSMGR->createInstance(SERVICE_GLOBALACCCFG), css::uno::UNO_QUERY_THROW); + + // get module accelerator configuration + css::uno::Reference< css::ui::XModuleUIConfigurationManagerSupplier > xModuleCfgSupplier(m_xSMGR->createInstance(SERVICE_MODULEUICONFIGSUPPLIER), css::uno::UNO_QUERY_THROW); + css::uno::Reference< css::ui::XUIConfigurationManager > xUICfgManager = xModuleCfgSupplier->getUIConfigurationManager(m_sModuleLongName); + m_xModule = css::uno::Reference< css::ui::XAcceleratorConfiguration >(xUICfgManager->getShortCutManager(), css::uno::UNO_QUERY_THROW); + } + catch(const css::uno::RuntimeException& exRun) + { throw exRun; } + catch(const css::uno::Exception&) + { m_xSMGR.clear(); } +} + +//----------------------------------------------- +/** Initialize text columns with own class to enable custom painting + This is needed as we have to paint disabled entries by ourself. No support for that in the + original SvTabListBox! + */ +void SfxAcceleratorConfigPage::CreateCustomItems( SvLBoxEntry* pEntry, + const String& sCol1 , + const String& sCol2 ) +{ + SfxAccCfgLBoxString_Impl* pStringItem = new SfxAccCfgLBoxString_Impl(pEntry, 0, sCol1); + pEntry->ReplaceItem(pStringItem, 1); + + pStringItem = new SfxAccCfgLBoxString_Impl(pEntry, 0, sCol2); + pEntry->ReplaceItem(pStringItem, 2); +} + +//----------------------------------------------- +void SfxAcceleratorConfigPage::Init(const css::uno::Reference< css::ui::XAcceleratorConfiguration >& xAccMgr) +{ + if (!xAccMgr.is()) + return; + + if (!m_bStylesInfoInitialized) + { + css::uno::Reference< css::frame::XController > xController; + css::uno::Reference< css::frame::XModel > xModel; + if (m_xFrame.is()) + xController = m_xFrame->getController(); + if (xController.is()) + xModel = xController->getModel(); + + m_aStylesInfo.setModel(xModel); + pFunctionBox->SetStylesInfo(&m_aStylesInfo); + pGroupLBox->SetStylesInfo(&m_aStylesInfo); + m_bStylesInfoInitialized = sal_True; + } + + // Insert all editable accelerators into list box. It is possible + // that some accelerators are not mapped on the current system/keyboard + // but we don't want to lose these mappings. + USHORT c1 = KEYCODE_ARRAY_SIZE; + USHORT i1 = 0; + USHORT nListPos = 0; + for (i1=0; i1<c1; ++i1) + { + KeyCode aKey = KEYCODE_ARRAY[i1]; + String sKey = aKey.GetName(); + if (!sKey.Len()) + continue; + TAccInfo* pEntry = new TAccInfo(i1, nListPos, aKey); + SvLBoxEntry* pLBEntry = aEntriesBox.InsertEntryToColumn(sKey, 0L, LIST_APPEND, 0xFFFF); + pLBEntry->SetUserData(pEntry); + } + + // Assign all commands to its shortcuts - reading the accelerator config. + css::uno::Sequence< css::awt::KeyEvent > lKeys = xAccMgr->getAllKeyEvents(); + sal_Int32 c2 = lKeys.getLength(); + sal_Int32 i2 = 0; + USHORT nCol = aEntriesBox.TabCount()-1; + + for (i2=0; i2<c2; ++i2) + { + const css::awt::KeyEvent& aAWTKey = lKeys[i2]; + ::rtl::OUString sCommand = xAccMgr->getCommandByKeyEvent(aAWTKey); + String sLabel = GetLabel4Command(sCommand); + KeyCode aKeyCode = ::svt::AcceleratorExecute::st_AWTKey2VCLKey(aAWTKey); + USHORT nPos = MapKeyCodeToPos(aKeyCode); + + if (nPos == LISTBOX_ENTRY_NOTFOUND) + continue; + + aEntriesBox.SetEntryText(sLabel, nPos, nCol); + + SvLBoxEntry* pLBEntry = aEntriesBox.GetEntry(0, nPos); + TAccInfo* pEntry = (TAccInfo*)pLBEntry->GetUserData(); + + pEntry->m_bIsConfigurable = sal_True; + pEntry->m_sCommand = sCommand; + CreateCustomItems(pLBEntry, aEntriesBox.GetEntryText(pLBEntry, 0), sLabel); + } + + // Map the VCL hardcoded key codes and mark them as not changeable + ULONG c3 = Application::GetReservedKeyCodeCount(); + ULONG i3 = 0; + for (i3=0; i3<c3; ++i3) + { + const KeyCode* pKeyCode = Application::GetReservedKeyCode(i3); + USHORT nPos = MapKeyCodeToPos(*pKeyCode); + + if (nPos == LISTBOX_ENTRY_NOTFOUND) + continue; + + // Hardcoded function mapped so no ID possible and mark entry as not changeable + SvLBoxEntry* pLBEntry = aEntriesBox.GetEntry(0, nPos); + TAccInfo* pEntry = (TAccInfo*)pLBEntry->GetUserData(); + + pEntry->m_bIsConfigurable = sal_False; + CreateCustomItems(pLBEntry, aEntriesBox.GetEntryText(pLBEntry, 0), String()); + } +} + +//----------------------------------------------- +void SfxAcceleratorConfigPage::Apply(const css::uno::Reference< css::ui::XAcceleratorConfiguration >& xAccMgr) +{ + if (!xAccMgr.is()) + return; + + // Go through the list from the bottom to the top ... + // because logical accelerator must be preferred instead of + // physical ones! + SvLBoxEntry* pEntry = aEntriesBox.First(); + while (pEntry) + { + TAccInfo* pUserData = (TAccInfo*)pEntry->GetUserData(); + ::rtl::OUString sCommand ; + css::awt::KeyEvent aAWTKey ; + + if (pUserData) + { + sCommand = pUserData->m_sCommand; + aAWTKey = ::svt::AcceleratorExecute::st_VCLKey2AWTKey(pUserData->m_aKey); + } + + try + { + if (sCommand.getLength()) + xAccMgr->setKeyEvent(aAWTKey, sCommand); + else + xAccMgr->removeKeyEvent(aAWTKey); + } + catch(const css::uno::RuntimeException& exRun) + { throw exRun; } + catch(const css::uno::Exception&) + {} + + pEntry = aEntriesBox.Next(pEntry); + } +} + +//----------------------------------------------- +void SfxAcceleratorConfigPage::ResetConfig() +{ + aEntriesBox.Clear(); +} + +//----------------------------------------------- +IMPL_LINK( SfxAcceleratorConfigPage, Load, Button*, EMPTYARG ) +{ + // ask for filename, where we should load the new config data from + StartFileDialog( WB_OPEN | WB_STDMODAL | WB_3DLOOK, aLoadAccelConfigStr ); + return 0; +} + +//----------------------------------------------- +IMPL_LINK( SfxAcceleratorConfigPage, Save, Button*, EMPTYARG ) +{ + StartFileDialog( WB_SAVEAS | WB_STDMODAL | WB_3DLOOK, aLoadAccelConfigStr ); + return 0; +} + +//----------------------------------------------- +IMPL_LINK(SfxAcceleratorConfigPage, Default, PushButton*, EMPTYARG) +{ + css::uno::Reference< css::form::XReset > xReset(m_xAct, css::uno::UNO_QUERY); + if (xReset.is()) + xReset->reset(); + + aEntriesBox.SetUpdateMode(FALSE); + ResetConfig(); + Init(m_xAct); + aEntriesBox.SetUpdateMode(TRUE); + aEntriesBox.Invalidate(); + aEntriesBox.Select(aEntriesBox.GetEntry(0, 0)); + + return 0; +} + +//----------------------------------------------- +IMPL_LINK( SfxAcceleratorConfigPage, ChangeHdl, Button*, EMPTYARG ) +{ + USHORT nPos = (USHORT) aEntriesBox.GetModel()->GetRelPos( aEntriesBox.FirstSelected() ); + TAccInfo* pEntry = (TAccInfo*)aEntriesBox.GetEntry(0, nPos)->GetUserData(); + String sNewCommand = pFunctionBox->GetCurCommand(); + String sLabel = pFunctionBox->GetCurLabel(); + if (!sLabel.Len()) + sLabel = GetLabel4Command(sNewCommand); + + pEntry->m_sCommand = sNewCommand; + USHORT nCol = aEntriesBox.TabCount() - 1; + aEntriesBox.SetEntryText(sLabel, nPos, nCol); + + ((Link &) pFunctionBox->GetSelectHdl()).Call( pFunctionBox ); + return 0; +} + +//----------------------------------------------- +IMPL_LINK( SfxAcceleratorConfigPage, RemoveHdl, Button *, EMPTYARG ) +{ + // get selected entry + USHORT nPos = (USHORT) aEntriesBox.GetModel()->GetRelPos( aEntriesBox.FirstSelected() ); + TAccInfo* pEntry = (TAccInfo*)aEntriesBox.GetEntry(0, nPos)->GetUserData(); + + // remove function name from selected entry + USHORT nCol = aEntriesBox.TabCount() - 1; + aEntriesBox.SetEntryText( String(), nPos, nCol ); + pEntry->m_sCommand = ::rtl::OUString(); + + ((Link &) pFunctionBox->GetSelectHdl()).Call( pFunctionBox ); + return 0; +} + +//----------------------------------------------- +IMPL_LINK( SfxAcceleratorConfigPage, SelectHdl, Control*, pListBox ) +{ + // disable help + Help::ShowBalloon( this, Point(), String() ); + if ( pListBox == &aEntriesBox ) + { + USHORT nPos = (USHORT) aEntriesBox.GetModel()->GetRelPos( aEntriesBox.FirstSelected() ); + TAccInfo* pEntry = (TAccInfo*)aEntriesBox.GetEntry(0, nPos)->GetUserData(); + ::rtl::OUString sPossibleNewCommand = pFunctionBox->GetCurCommand(); + + aRemoveButton.Enable( FALSE ); + aChangeButton.Enable( FALSE ); + + if (pEntry->m_bIsConfigurable) + { + if (pEntry->isConfigured()) + aRemoveButton.Enable( TRUE ); + aChangeButton.Enable( pEntry->m_sCommand != sPossibleNewCommand ); + } + } + else if ( pListBox == pGroupLBox ) + { + pGroupLBox->GroupSelected(); + if ( !pFunctionBox->FirstSelected() ) + aChangeButton.Enable( FALSE ); + } + else if ( pListBox == pFunctionBox ) + { + aRemoveButton.Enable( FALSE ); + aChangeButton.Enable( FALSE ); + + // #i36994 First selected can return zero! + SvLBoxEntry* pLBEntry = aEntriesBox.FirstSelected(); + if ( pLBEntry != 0 ) + { + USHORT nPos = (USHORT) aEntriesBox.GetModel()->GetRelPos( pLBEntry ); + TAccInfo* pEntry = (TAccInfo*)aEntriesBox.GetEntry(0, nPos)->GetUserData(); + ::rtl::OUString sPossibleNewCommand = pFunctionBox->GetCurCommand(); + + if (pEntry->m_bIsConfigurable) + { + if (pEntry->isConfigured()) + aRemoveButton.Enable( TRUE ); + aChangeButton.Enable( pEntry->m_sCommand != sPossibleNewCommand ); + } + + // update key box + aKeyBox.Clear(); + SvLBoxEntry* pIt = aEntriesBox.First(); + while ( pIt ) + { + TAccInfo* pUserData = (TAccInfo*)pIt->GetUserData(); + if ( pUserData && pUserData->m_sCommand == sPossibleNewCommand ) + { + TAccInfo* pU1 = new TAccInfo(-1, -1, pUserData->m_aKey); + SvLBoxEntry* pE1 = aKeyBox.InsertEntry( pUserData->m_aKey.GetName(), 0L, TRUE, LIST_APPEND ); + pE1->SetUserData(pU1); + pE1->EnableChildsOnDemand( FALSE ); + } + pIt = aEntriesBox.Next(pIt); + } + } + } + else + { + // goto selected "key" entry of the key box + SvLBoxEntry* pE2 = 0; + TAccInfo* pU2 = 0; + USHORT nP2 = LISTBOX_ENTRY_NOTFOUND; + SvLBoxEntry* pE3 = 0; + + pE2 = aKeyBox.FirstSelected(); + if (pE2) + pU2 = (TAccInfo*)pE2->GetUserData(); + if (pU2) + nP2 = MapKeyCodeToPos(pU2->m_aKey); + if (nP2 != LISTBOX_ENTRY_NOTFOUND) + pE3 = aEntriesBox.GetEntry( 0, nP2 ); + if (pE3) + { + aEntriesBox.Select( pE3 ); + aEntriesBox.MakeVisible( pE3 ); + } + } + + return 0; +} + +//----------------------------------------------- +IMPL_LINK( SfxAcceleratorConfigPage, RadioHdl, RadioButton *, EMPTYARG ) +{ + css::uno::Reference< css::ui::XAcceleratorConfiguration > xOld = m_xAct; + + if (aOfficeButton.IsChecked()) + m_xAct = m_xGlobal; + else if (aModuleButton.IsChecked()) + m_xAct = m_xModule; + + // nothing changed? => do nothing! + if ( m_xAct.is() && ( xOld == m_xAct ) ) + return 0; + + aEntriesBox.SetUpdateMode( FALSE ); + ResetConfig(); + Init(m_xAct); + aEntriesBox.SetUpdateMode( TRUE ); + aEntriesBox.Invalidate(); + + pGroupLBox->Init(m_xSMGR, m_xFrame, m_sModuleLongName); + + // pb: #133213# do not select NULL entries + SvLBoxEntry* pEntry = aEntriesBox.GetEntry( 0, 0 ); + if ( pEntry ) + aEntriesBox.Select( pEntry ); + pEntry = pGroupLBox->GetEntry( 0, 0 ); + if ( pEntry ) + pGroupLBox->Select( pEntry ); + + ((Link &) pFunctionBox->GetSelectHdl()).Call( pFunctionBox ); + return 1L; +} + +//----------------------------------------------- +IMPL_LINK( SfxAcceleratorConfigPage, LoadHdl, sfx2::FileDialogHelper*, EMPTYARG ) +{ + DBG_ASSERT( m_pFileDlg, "SfxInternetPage::DialogClosedHdl(): no file dialog" ); + + ::rtl::OUString sCfgName; + if ( ERRCODE_NONE == m_pFileDlg->GetError() ) + sCfgName = m_pFileDlg->GetPath(); + + if ( !sCfgName.getLength() ) + return 0; + + GetTabDialog()->EnterWait(); + + css::uno::Reference< css::frame::XModel > xDoc ; + css::uno::Reference< css::ui::XUIConfigurationManager > xCfgMgr ; + css::uno::Reference< css::embed::XStorage > xRootStorage; // we must hold the root storage alive, if xCfgMgr is used! + + try + { + // first check if URL points to a document already loaded + xDoc = SearchForAlreadyLoadedDoc(sCfgName); + if (xDoc.is()) + { + // Get ui config manager. There should always be one at the model. + css::uno::Reference< css::ui::XUIConfigurationManagerSupplier > xCfgSupplier(xDoc, css::uno::UNO_QUERY_THROW); + xCfgMgr = xCfgSupplier->getUIConfigurationManager(); + } + else + { + // URL doesn't point to a loaded document, try to access it as a single storage + // dont forget to release the storage afterwards! + css::uno::Reference< css::lang::XSingleServiceFactory > xStorageFactory(m_xSMGR->createInstance(SERVICE_STORAGEFACTORY), css::uno::UNO_QUERY_THROW); + css::uno::Sequence< css::uno::Any > lArgs(2); + lArgs[0] <<= sCfgName; + lArgs[1] <<= css::embed::ElementModes::READ; + + xRootStorage = css::uno::Reference< css::embed::XStorage >(xStorageFactory->createInstanceWithArguments(lArgs), css::uno::UNO_QUERY_THROW); + css::uno::Reference< css::embed::XStorage > xUIConfig = xRootStorage->openStorageElement(FOLDERNAME_UICONFIG, css::embed::ElementModes::READ); + if (xUIConfig.is()) + { + xCfgMgr = css::uno::Reference< css::ui::XUIConfigurationManager >(m_xSMGR->createInstance(SERVICE_UICONFIGMGR), css::uno::UNO_QUERY_THROW); + css::uno::Reference< css::ui::XUIConfigurationStorage > xCfgMgrStore(xCfgMgr, css::uno::UNO_QUERY_THROW); + xCfgMgrStore->setStorage(xUIConfig); + } + } + + if (xCfgMgr.is()) + { + // open the configuration and update our UI + css::uno::Reference< css::ui::XAcceleratorConfiguration > xTempAccMgr(xCfgMgr->getShortCutManager(), css::uno::UNO_QUERY_THROW); + + aEntriesBox.SetUpdateMode(FALSE); + ResetConfig(); + Init(xTempAccMgr); + aEntriesBox.SetUpdateMode(TRUE); + aEntriesBox.Invalidate(); + aEntriesBox.Select(aEntriesBox.GetEntry(0, 0)); + + } + + // dont forget to close the new opened storage! + // We are the owner of it. + if (xRootStorage.is()) + { + css::uno::Reference< css::lang::XComponent > xComponent; + xComponent = css::uno::Reference< css::lang::XComponent >(xCfgMgr, css::uno::UNO_QUERY); + if (xComponent.is()) + xComponent->dispose(); + xComponent = css::uno::Reference< css::lang::XComponent >(xRootStorage, css::uno::UNO_QUERY); + if (xComponent.is()) + xComponent->dispose(); + } + } + catch(const css::uno::RuntimeException& exRun) + { throw exRun; } + catch(const css::uno::Exception&) + {} + + GetTabDialog()->LeaveWait(); + + return 0; +} + +//----------------------------------------------- +IMPL_LINK( SfxAcceleratorConfigPage, SaveHdl, sfx2::FileDialogHelper*, EMPTYARG ) +{ + DBG_ASSERT( m_pFileDlg, "SfxInternetPage::DialogClosedHdl(): no file dialog" ); + + ::rtl::OUString sCfgName; + if ( ERRCODE_NONE == m_pFileDlg->GetError() ) + sCfgName = m_pFileDlg->GetPath(); + + if ( !sCfgName.getLength() ) + return 0; + + GetTabDialog()->EnterWait(); + + css::uno::Reference< css::frame::XModel > xDoc ; + css::uno::Reference< css::ui::XUIConfigurationManager > xCfgMgr ; + css::uno::Reference< css::embed::XStorage > xRootStorage; + + try + { + // first check if URL points to a document already loaded + xDoc = SearchForAlreadyLoadedDoc(sCfgName); + if (xDoc.is()) + { + // get config manager, force creation if there was none before + css::uno::Reference< css::ui::XUIConfigurationManagerSupplier > xCfgSupplier(xDoc, css::uno::UNO_QUERY_THROW); + xCfgMgr = xCfgSupplier->getUIConfigurationManager(); + } + else + { + // URL doesn't point to a loaded document, try to access it as a single storage + css::uno::Reference< css::lang::XSingleServiceFactory > xStorageFactory(m_xSMGR->createInstance(SERVICE_STORAGEFACTORY), css::uno::UNO_QUERY_THROW); + css::uno::Sequence< css::uno::Any > lArgs(2); + lArgs[0] <<= sCfgName; + lArgs[1] <<= css::embed::ElementModes::WRITE; + + xRootStorage = css::uno::Reference< css::embed::XStorage >( + xStorageFactory->createInstanceWithArguments(lArgs), + css::uno::UNO_QUERY_THROW); + + css::uno::Reference< css::embed::XStorage > xUIConfig( + xRootStorage->openStorageElement(FOLDERNAME_UICONFIG, css::embed::ElementModes::WRITE), + css::uno::UNO_QUERY_THROW); + css::uno::Reference< css::beans::XPropertySet > xUIConfigProps( + xUIConfig, + css::uno::UNO_QUERY_THROW); + + // set the correct media type if the storage was new created + ::rtl::OUString sMediaType; + xUIConfigProps->getPropertyValue(MEDIATYPE_PROPNAME) >>= sMediaType; + if (!sMediaType.getLength()) + xUIConfigProps->setPropertyValue(MEDIATYPE_PROPNAME, css::uno::makeAny(MEDIATYPE_UICONFIG)); + + xCfgMgr = css::uno::Reference< css::ui::XUIConfigurationManager >(m_xSMGR->createInstance(SERVICE_UICONFIGMGR), css::uno::UNO_QUERY_THROW); + css::uno::Reference< css::ui::XUIConfigurationStorage > xUICfgStore(xCfgMgr, css::uno::UNO_QUERY_THROW); + xUICfgStore->setStorage(xUIConfig); + } + + if (xCfgMgr.is()) + { + // get the target configuration access and update with all shortcuts + // which are set currently at the UI ! + // Dont copy the m_xAct content to it ... because m_xAct will be updated + // from the UI on pressing the button "OK" only. And inbetween it's not up to date ! + css::uno::Reference< css::ui::XAcceleratorConfiguration > xTargetAccMgr(xCfgMgr->getShortCutManager(), css::uno::UNO_QUERY_THROW); + Apply(xTargetAccMgr); + + // commit (order is important!) + css::uno::Reference< css::ui::XUIConfigurationPersistence > xCommit1(xTargetAccMgr, css::uno::UNO_QUERY_THROW); + css::uno::Reference< css::ui::XUIConfigurationPersistence > xCommit2(xCfgMgr , css::uno::UNO_QUERY_THROW); + xCommit1->store(); + xCommit2->store(); + + if (xRootStorage.is()) + { + // Commit root storage + css::uno::Reference< css::embed::XTransactedObject > xCommit3(xRootStorage, css::uno::UNO_QUERY_THROW); + xCommit3->commit(); + } + } + + if (xRootStorage.is()) + { + css::uno::Reference< css::lang::XComponent > xComponent; + xComponent = css::uno::Reference< css::lang::XComponent >(xCfgMgr, css::uno::UNO_QUERY); + if (xComponent.is()) + xComponent->dispose(); + xComponent = css::uno::Reference< css::lang::XComponent >(xRootStorage, css::uno::UNO_QUERY); + if (xComponent.is()) + xComponent->dispose(); + } + } + catch(const css::uno::RuntimeException& exRun) + { throw exRun; } + catch(const css::uno::Exception&) + {} + + GetTabDialog()->LeaveWait(); + + return 0; +} + +::rtl::OUString RetrieveLabelFromCommand( const ::rtl::OUString& aCmdURL ) +{ + ::rtl::OUString aLabel; + if ( aCmdURL.getLength() ) + { + try + { + uno::Reference< container::XNameAccess > xNameAccess( ::comphelper::getProcessServiceFactory()->createInstance( rtl::OUString::createFromAscii("com.sun.star.frame.UICommandDescription") ), uno::UNO_QUERY ); + if ( xNameAccess.is() ) + { + uno::Reference< container::XNameAccess > xUICommandLabels; + const ::rtl::OUString aModule( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.TextDocument" ) ); + uno::Any a = xNameAccess->getByName( aModule ); + uno::Reference< container::XNameAccess > xUICommands; + a >>= xUICommandLabels; + rtl::OUString aStr; + uno::Sequence< beans::PropertyValue > aPropSeq; + a = xUICommandLabels->getByName( aCmdURL ); + if ( a >>= aPropSeq ) + { + for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ ) + { + if ( aPropSeq[i].Name.equalsAscii( "Name" )) + { + aPropSeq[i].Value >>= aStr; + break; + } + } + } + aLabel = aStr; + } + } + catch ( uno::Exception& ) + { + } + } + + return aLabel; +} + + +//----------------------------------------------- +String SfxAcceleratorConfigPage::GetFunctionName(KeyFuncType eType) const +{ + ::rtl::OUStringBuffer sName(256); + sName.appendAscii("\""); + switch(eType) + { + case KEYFUNC_NEW : + sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:NewDoc") ) ); + break; + + case KEYFUNC_OPEN : + sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Open") ) ); + break; + + case KEYFUNC_SAVE : + sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Save") ) ); + break; + + case KEYFUNC_SAVEAS : + sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:SaveAs") ) ); + break; + + case KEYFUNC_PRINT : + sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Print") ) ); + break; + + case KEYFUNC_CLOSE : + sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Close") ) ); + break; + + case KEYFUNC_QUIT : + sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Quit") ) ); + break; + + case KEYFUNC_CUT : + sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Cut") ) ); + break; + + case KEYFUNC_COPY : + sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Copy") ) ); + break; + + case KEYFUNC_PASTE : + sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Paste") ) ); + break; + + case KEYFUNC_UNDO : + sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Undo") ) ); + break; + + case KEYFUNC_REDO : + sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Redo") ) ); + break; + + case KEYFUNC_DELETE : + sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Delete") ) ); + break; + + case KEYFUNC_REPEAT : + sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Repeat") ) ); + break; + + case KEYFUNC_FIND : + sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Search") ) ); + break; + + case KEYFUNC_FINDBACKWARD : + sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:SearchBackwards") ) ); + break; + + case KEYFUNC_PROPERTIES : + sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Options") ) ); + break; + + case KEYFUNC_FRONT : + sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:ToFront") ) ); + break; + + default: + break; + } + sName.appendAscii("\""); + return String(sName.makeStringAndClear()); +} + +//----------------------------------------------- +void SfxAcceleratorConfigPage::StartFileDialog( WinBits nBits, const String& rTitle ) +{ + bool bSave = ( ( nBits & WB_SAVEAS ) == WB_SAVEAS ); + short nDialogType = bSave ? css::ui::dialogs::TemplateDescription::FILESAVE_SIMPLE + : css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE; + if ( m_pFileDlg ) + delete m_pFileDlg; + m_pFileDlg = new sfx2::FileDialogHelper( nDialogType, 0 ); + + m_pFileDlg->SetTitle( rTitle ); +// m_pFileDlg->SetDialogHelpId( bSave ? HID_CONFIG_SAVE : HID_CONFIG_LOAD ); + m_pFileDlg->AddFilter( aFilterAllStr, DEFINE_CONST_UNICODE( FILEDIALOG_FILTER_ALL ) ); + m_pFileDlg->AddFilter( aFilterCfgStr, DEFINE_CONST_UNICODE( "*.cfg" ) ); + + Link aDlgClosedLink = bSave ? LINK( this, SfxAcceleratorConfigPage, SaveHdl ) + : LINK( this, SfxAcceleratorConfigPage, LoadHdl ); + m_pFileDlg->StartExecuteModal( aDlgClosedLink ); +} + +//----------------------------------------------- +BOOL SfxAcceleratorConfigPage::FillItemSet( SfxItemSet& ) +{ + Apply(m_xAct); + try + { + m_xAct->store(); + } + catch(const css::uno::RuntimeException& exRun) + { throw exRun; } + catch(const css::uno::Exception&) + { return FALSE; } + + return TRUE; +} + +//----------------------------------------------- +void SfxAcceleratorConfigPage::Reset( const SfxItemSet& rSet ) +{ + // open accelerator configs + // Note: It initialize some other members too, which are needed here ... + // e.g. m_sModuleUIName! + InitAccCfg(); + + // change te description of the radio button, which switch to the module + // dependend accelerator configuration + String sButtonText = aModuleButton.GetText(); + sButtonText.SearchAndReplace(String::CreateFromAscii("$(MODULE)"), m_sModuleUIName); + aModuleButton.SetText(sButtonText); + + if (m_xModule.is()) + aModuleButton.Check(); + else + { + aModuleButton.Hide(); + aOfficeButton.Check(); + } + + RadioHdl(0); + + const SfxPoolItem* pMacroItem=0; + if( SFX_ITEM_SET == rSet.GetItemState( SID_MACROINFO, TRUE, &pMacroItem ) ) + { + m_pMacroInfoItem = PTR_CAST( SfxMacroInfoItem, pMacroItem ); + pGroupLBox->SelectMacro( m_pMacroInfoItem ); + } + else + { + const SfxPoolItem* pStringItem=0; + if( SFX_ITEM_SET == rSet.GetItemState( SID_CHARMAP, TRUE, &pStringItem ) ) + m_pStringItem = PTR_CAST( SfxStringItem, pStringItem ); + + const SfxPoolItem* pFontItem=0; + if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_SPECIALCHAR, TRUE, &pFontItem ) ) + m_pFontItem = PTR_CAST( SfxStringItem, pFontItem ); + + if ( m_pStringItem ) + pGroupLBox->AddAndSelect( m_pStringItem, m_pFontItem ); + } +} + +//----------------------------------------------- +void SfxAcceleratorConfigPage::SelectMacro(const SfxMacroInfoItem *pItem) +{ + m_pMacroInfoItem = pItem; + pGroupLBox->SelectMacro( pItem ); +} + +//----------------------------------------------- +void SfxAcceleratorConfigPage::CopySource2Target(const css::uno::Reference< css::ui::XAcceleratorConfiguration >& xSourceAccMgr, + const css::uno::Reference< css::ui::XAcceleratorConfiguration >& xTargetAccMgr) +{ + const css::uno::Sequence< css::awt::KeyEvent > lKeys = xSourceAccMgr->getAllKeyEvents(); + sal_Int32 c = lKeys.getLength(); + sal_Int32 i = 0; + for (i=0; i<c; ++i) + { + const css::awt::KeyEvent& rKey = lKeys[i]; + ::rtl::OUString sCommand = xSourceAccMgr->getCommandByKeyEvent(rKey); + xTargetAccMgr->setKeyEvent(rKey, sCommand); + } +} + +//----------------------------------------------- +KeyCode SfxAcceleratorConfigPage::MapPosToKeyCode(USHORT nPos) const +{ + TAccInfo* pEntry = (TAccInfo*)aEntriesBox.GetEntry(0, nPos)->GetUserData(); + KeyCode aCode(KEYCODE_ARRAY[pEntry->m_nKeyPos] & 0xFFF , + KEYCODE_ARRAY[pEntry->m_nKeyPos] & (KEY_SHIFT | KEY_MOD2)); + return aCode; +} + +//----------------------------------------------- +USHORT SfxAcceleratorConfigPage::MapKeyCodeToPos(const KeyCode& aKey) const +{ + USHORT nCode1 = aKey.GetCode()+aKey.GetModifier(); + SvLBoxEntry* pEntry = aEntriesBox.First(); + USHORT i = 0; + + while (pEntry) + { + TAccInfo* pUserData = (TAccInfo*)pEntry->GetUserData(); + if (pUserData) + { + USHORT nCode2 = pUserData->m_aKey.GetCode()+pUserData->m_aKey.GetModifier(); + if (nCode1 == nCode2) + return i; + } + pEntry = aEntriesBox.Next(pEntry); + ++i; + } + + return LISTBOX_ENTRY_NOTFOUND; +} + +//----------------------------------------------- +String SfxAcceleratorConfigPage::GetLabel4Command(const String& sCommand) +{ + try + { + // check global command configuration first + css::uno::Reference< css::container::XNameAccess > xModuleConf; + m_xUICmdDescription->getByName(m_sModuleLongName) >>= xModuleConf; + if (xModuleConf.is()) + { + ::comphelper::SequenceAsHashMap lProps(xModuleConf->getByName(sCommand)); + String sLabel = String(lProps.getUnpackedValueOrDefault(CMDPROP_UINAME, ::rtl::OUString())); + if (sLabel.Len()) + return sLabel; + } + } + catch(const css::uno::RuntimeException& exRun) + { throw exRun; } + catch(const css::uno::Exception&) + {} + + // may be it's a style URL .. they must be handled special + SfxStyleInfo_Impl aStyle; + aStyle.sCommand = sCommand; + if (m_aStylesInfo.parseStyleCommand(aStyle)) + { + m_aStylesInfo.getLabel4Style(aStyle); + return aStyle.sLabel; + } + else + { + String aRet( String::CreateFromAscii("Symbols: ") ); + xub_StrLen nPos = sCommand.SearchAscii(".uno:InsertSymbol?Symbols:string="); + if ( nPos == 0 ) + { + aRet += String( sCommand, 34, sCommand.Len()-34 ); + return aRet; + } + } + + return sCommand; +} + +SfxTabPage* SfxAcceleratorConfigPage::Create( Window* pParent, const SfxItemSet& rAttrSet ) +{ + return new SfxAcceleratorConfigPage( pParent, rAttrSet ); +} + +//----------------------------------------------- +css::uno::Reference< css::frame::XModel > SfxAcceleratorConfigPage::SearchForAlreadyLoadedDoc(const String& /*sName*/) +{ + return css::uno::Reference< css::frame::XModel >(); +} + +SvxShortcutAssignDlg::SvxShortcutAssignDlg( Window* pParent, const uno::Reference< frame::XFrame >& rxDocumentFrame, const SfxItemSet& rSet ) + : SfxSingleTabDialog( pParent, rSet, 0 ) +{ + SfxTabPage* pPage = SfxAcceleratorConfigPage::Create( this, rSet ); + pPage->SetFrame( rxDocumentFrame ); + SetTabPage( pPage ); + +} + +SvxShortcutAssignDlg::~SvxShortcutAssignDlg() +{ +} + + +// .uno:InsertSymbol?Symbols:string=bla diff --git a/svx/source/cui/acccfg.hrc b/svx/source/cui/acccfg.hrc new file mode 100644 index 000000000000..2144af68df35 --- /dev/null +++ b/svx/source/cui/acccfg.hrc @@ -0,0 +1,78 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: cfg.hrc,v $ + * $Revision: 1.8 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#define GRP_FUNCTIONS 22 +#define BTN_ACC_OK 1 +#define BTN_ACC_CANCEL 2 +#define BTN_ACC_CHANGE 3 +#define BTN_ACC_REMOVE 4 +#define BOX_ACC_ENTRIES 5 +#define TXT_ACC_DESCRIPTIONTEXT 6 +#define TXT_ACC_DESCRIPTIONINFO 7 +#define GRP_ACC_KEYBOARD 8 +#define TXT_ACC_GROUP 9 +#define BOX_ACC_GROUP 10 +#define TXT_ACC_FUNCTION 11 +#define BOX_ACC_FUNCTION 12 +#define TXT_ACC_KEY 13 +#define BOX_ACC_KEY 14 +#define GRP_ACC_FUNCTIONS 15 +#define BTN_RESET 20 +#define BTN_LOAD 40 +#define BTN_SAVE 41 +#define RB_OFFICE 44 +#define RB_MODULE 45 +#define STR_LOADACCELCONFIG 46 +#define STR_SAVEACCELCONFIG 47 + +#define IMG_HARDDISK 48 +#define IMG_HARDDISK_HC 49 +#define STR_PRODMACROS 50 +#define STR_MYMACROS 51 +#define IMG_LIB 52 +#define IMG_LIB_HC 53 +#define IMG_MACRO 54 +#define IMG_MACRO_HC 55 +#define IMG_DOC 56 +#define IMG_DOC_HC 57 +#define STR_GROUP_STYLES 58 +#define STR_PDF_EXPORT_SEND 59 +#define STR_RECHECK_DOCUMENT 60 +#define IMG_INFO 61 +#define STR_BASICNAME 62 +#define BMP_COLLAPSED 63 +#define BMP_EXPANDED 64 +#define BMP_COLLAPSED_HC 65 +#define BMP_EXPANDED_HC 66 +#define STR_BASICMACROS 67 +#define STR_DLG_MACROS 68 +#define STR_HUMAN_APPNAME 69 +#define STR_FILTERNAME_CFG 70 + diff --git a/svx/source/cui/acccfg.hxx b/svx/source/cui/acccfg.hxx new file mode 100644 index 000000000000..245cc81e89aa --- /dev/null +++ b/svx/source/cui/acccfg.hxx @@ -0,0 +1,288 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: acccfg.hxx,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _ACCCFG_HXX +#define _ACCCFG_HXX + +// #include ***************************************************************** + +#include <com/sun/star/beans/XPropertySet.hpp> +#include <com/sun/star/container/XIndexContainer.hpp> +#include <com/sun/star/container/XNameAccess.hpp> +#include <com/sun/star/frame/XModuleManager.hpp> +#include <com/sun/star/ui/XUIConfigurationManager.hpp> +#include <com/sun/star/ui/XAcceleratorConfiguration.hpp> +#include <com/sun/star/frame/XFrame.hpp> +#include <com/sun/star/frame/XStorable.hpp> +#include <com/sun/star/uno/XComponentContext.hpp> +#include <com/sun/star/lang/XSingleComponentFactory.hpp> +#include <com/sun/star/script/browse/XBrowseNode.hpp> +#include <com/sun/star/container/XNameAccess.hpp> +#include <com/sun/star/frame/XFrame.hpp> + +#include <algorithm> + +#include <vcl/fixed.hxx> +#include <vcl/button.hxx> +#include <vcl/dialog.hxx> +#include <vcl/lstbox.hxx> +#include <vcl/group.hxx> +#include <svtools/svtabbx.hxx> +#include <svtools/svtreebx.hxx> +#include <sfx2/tabdlg.hxx> +#include <sfx2/basedlgs.hxx> + +#define _SVSTDARR_STRINGSDTOR +#include <svtools/svstdarr.hxx> + +#include <sfx2/minarray.hxx> + +#include "cfgutil.hxx" + +// class SfxAcceleratorConfigListBox ************************************************* + +#define css ::com::sun::star + +class SfxMacroInfoItem; +class SfxConfigGroupListBox_Impl; +class SfxConfigFunctionListBox_Impl; +class SfxAcceleratorConfigPage; + +class SfxAccCfgTabListBox_Impl : public SvTabListBox +{ + SfxAcceleratorConfigPage* m_pAccelConfigPage; + + void KeyInput( const KeyEvent &rKEvt ); + +protected: + virtual void InitEntry( SvLBoxEntry*, const XubString&, const Image&, const Image&, SvLBoxButtonKind eButtonKind ); + +public: + SfxAccCfgTabListBox_Impl( + SfxAcceleratorConfigPage* pAccelConfigPage, + Window *pParent, + const ResId &rResId ) : + SvTabListBox( pParent, rResId ), + m_pAccelConfigPage( pAccelConfigPage ) + {} + + void ReplaceEntry( USHORT nPos, const String &rStr ); +}; + +// class SfxAcceleratorConfigPage ---------------------------------------- + +struct TAccInfo +{ + public: + + TAccInfo( sal_Int32 nKeyPos , + sal_Int32 nListPos, + const KeyCode& aKey ) + : m_nKeyPos (nKeyPos ) + , m_nListPos (nListPos ) + , m_bIsConfigurable(sal_True ) + , m_sCommand ( ) + , m_aKey (aKey ) + // its important to set TRUE as default - + // because only fix entries will be disabled later ... + {} + + sal_Bool isConfigured() const + { + return (m_nKeyPos>-1 && m_nListPos>-1 && m_sCommand.getLength()); + } + + sal_Int32 m_nKeyPos; + sal_Int32 m_nListPos; + sal_Bool m_bIsConfigurable; + ::rtl::OUString m_sCommand; + KeyCode m_aKey; +}; + +namespace sfx2 +{ + class FileDialogHelper; +} + +class SfxAcceleratorConfigPage : public SfxTabPage +{ + friend class SfxAccCfgTabListBox_Impl; +private: + const SfxMacroInfoItem* m_pMacroInfoItem; + const SfxStringItem* m_pStringItem; + const SfxStringItem* m_pFontItem; + sfx2::FileDialogHelper* m_pFileDlg; + + SfxAccCfgTabListBox_Impl aEntriesBox; + FixedLine aKeyboardGroup; + RadioButton aOfficeButton; + RadioButton aModuleButton; + PushButton aChangeButton; + PushButton aRemoveButton; + FixedText aGroupText; + SfxConfigGroupListBox_Impl* pGroupLBox; + FixedText aFunctionText; + SfxConfigFunctionListBox_Impl* pFunctionBox; + FixedText aKeyText; + SvTreeListBox aKeyBox; + FixedLine aFunctionsGroup; + PushButton aLoadButton; + PushButton aSaveButton; + PushButton aResetButton; + String aLoadAccelConfigStr; + String aSaveAccelConfigStr; + String aFilterAllStr; + String aFilterCfgStr; + SfxStylesInfo_Impl m_aStylesInfo; + sal_Bool m_bStylesInfoInitialized; + + css::uno::Reference< css::lang::XMultiServiceFactory > m_xSMGR; + css::uno::Reference< css::ui::XAcceleratorConfiguration > m_xGlobal; + css::uno::Reference< css::ui::XAcceleratorConfiguration > m_xModule; + css::uno::Reference< css::ui::XAcceleratorConfiguration > m_xAct; + css::uno::Reference< css::container::XNameAccess > m_xUICmdDescription; + css::uno::Reference< css::frame::XFrame > m_xFrame; + + ::rtl::OUString m_sModuleLongName; + ::rtl::OUString m_sModuleShortName; + ::rtl::OUString m_sModuleUIName; + + DECL_LINK( ChangeHdl, Button * ); + DECL_LINK( RemoveHdl, Button * ); + DECL_LINK( SelectHdl, Control * ); + DECL_LINK( Save, Button * ); + DECL_LINK( Load, Button * ); + DECL_LINK( Default, PushButton * ); + DECL_LINK( RadioHdl, RadioButton* ); + + DECL_LINK( LoadHdl, sfx2::FileDialogHelper* ); + DECL_LINK( SaveHdl, sfx2::FileDialogHelper* ); + + String GetLabel4Command(const String& sCommand); + void InitAccCfg(); + KeyCode MapPosToKeyCode( USHORT nPos ) const; + USHORT MapKeyCodeToPos( const KeyCode &rCode ) const; + String GetFunctionName( KeyFuncType eType ) const; + css::uno::Reference< css::frame::XModel > SearchForAlreadyLoadedDoc(const String& sName); + void StartFileDialog( WinBits nBits, const String& rTitle ); + + void Init(const css::uno::Reference< css::ui::XAcceleratorConfiguration >& pAccMgr); + void ResetConfig(); + + void CreateCustomItems( SvLBoxEntry* pEntry, const String& aCol1, const String& aCol2 ); + +public: + SfxAcceleratorConfigPage( Window *pParent, const SfxItemSet& rItemSet ); + virtual ~SfxAcceleratorConfigPage(); + + virtual BOOL FillItemSet( SfxItemSet& ); + virtual void Reset( const SfxItemSet& ); + + void SelectMacro(const SfxMacroInfoItem*); + void Apply(const css::uno::Reference< css::ui::XAcceleratorConfiguration >& pAccMgr); + void CopySource2Target(const css::uno::Reference< css::ui::XAcceleratorConfiguration >& xSourceAccMgr, + const css::uno::Reference< css::ui::XAcceleratorConfiguration >& xTargetAccMgr); + static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); +}; + + +class SfxAcceleratorConfigListBox : public ListBox +{ + void KeyInput( const KeyEvent &rKEvt ); + +public: + + SfxAcceleratorConfigListBox( Window *pParent, ResId &rResId ) : + ListBox( pParent, rResId ) {} + + void ReplaceEntry( USHORT nPos, const String &rStr ); + void ExpandEntry ( USHORT nPos, const String &rStr ); +}; + +/* +// class USHORTArr ********************************************************** + +DECL_2BYTEARRAY(USHORTArr, USHORT, 10, 10) + +// class SfxAcceleratorConfigDialog ************************************************** + +class SfxAcceleratorConfigDialog : public ModalDialog +{ + OKButton aOKButton; + CancelButton aCancelButton; + PushButton aChangeButton; + PushButton aRemoveButton; + SfxAcceleratorConfigListBox aEntriesBox; + FixedText aDescriptionTextText; + FixedText aDescriptionInfoText; + FixedLine aKeyboardGroup; + FixedText aGroupText; + ListBox aGroupLBox; + FixedText aFunctionText; + ListBox aFunctionBox; + FixedText aKeyText; + ListBox aKeyBox; + FixedLine aFunctionsGroup; + + USHORTArr aAccelArr; + USHORTArr aFunctionArr; + USHORTArr aKeyArr; + + void OKHdl ( Button * ); + void ChangeHdl( Button * ); + void RemoveHdl( Button * ); + void SelectHdl( ListBox *pListBox ); + + KeyCode PosToKeyCode ( USHORT nPos ) const; + USHORT KeyCodeToPos ( const KeyCode &rCode ) const; + String GetFunctionName( KeyFuncType eType ) const; + +public: + + SfxAcceleratorConfigDialog( Window *pParent ); +}; +*/ + +class SvxShortcutAssignDlg : public SfxSingleTabDialog +{ +public: + SvxShortcutAssignDlg( + Window* pParent, + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxDocumentFrame, + const SfxItemSet& rSet ); + virtual ~SvxShortcutAssignDlg(); +}; + + + +#undef css + +#endif + diff --git a/svx/source/cui/acccfg.src b/svx/source/cui/acccfg.src new file mode 100644 index 000000000000..df0e0922da12 --- /dev/null +++ b/svx/source/cui/acccfg.src @@ -0,0 +1,360 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: cfg.src,v $ + * $Revision: 1.47 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + // include --------------------------------------------------------------- +#include "helpid.hrc" +#include "svx/dialogs.hrc" +#include "acccfg.hrc" + +#define MASKCOLOR MaskColor = \ + Color { Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; }; + +#define PUSHBUTTON_TEXT_SAVE \ + Text [ en-US ] = "~Save..." ; \ + +#define PUSHBUTTON_TEXT_RESET \ + Text [ en-US ] = "R~eset" ; \ + +#define PUSHBUTTON_TEXT_LOAD \ + Text [ en-US ] = "~Load..." ; \ + +#define PUSHBUTTON_TEXT_REMOVE \ + Text [ en-US ] = "~Delete" ; \ + +#define PUSHBUTTON_TEXT_CHANGE \ + Text [ en-US ] = "~Modify" ; \ + +#define PUSHBUTTON_TEXT_NEW \ + Text [ en-US ] = "~New" ; \ + +#define FIXEDTEXT_TEXT_GROUP \ + Text [ en-US ] = "~Category" ; \ + +#define FIXEDTEXT_TEXT_FUNCTION \ + Text [ en-US ] = "Function" ; \ + +#define GROUPBOX_TEXT_FUNCTIONS \ + Text [ en-US ] = "Functions" ; \ + + // TP_CONFIG_ACCEL ------------------------------------------------------- +TabPage RID_SVXPAGE_KEYBOARD +{ + HelpId = HID_CONFIG_ACCEL ; + Hide = TRUE ; + Size = MAP_APPFONT ( 273 , 258 ) ; + RadioButton RB_OFFICE + { + Pos = MAP_APPFONT ( 192 , 6 ) ; + Size = MAP_APPFONT ( 75 , 10 ) ; + Text = "%PRODUCTNAME" ; + }; + RadioButton RB_MODULE + { + Pos = MAP_APPFONT ( 192 , 19 ) ; + Size = MAP_APPFONT ( 75 , 10 ) ; + Text = "$(MODULE)" ; + }; + PushButton BTN_ACC_CHANGE + { + Pos = MAP_APPFONT ( 192 , 35 ) ; + Size = MAP_APPFONT ( 75 , 14 ) ; + TabStop = TRUE ; + PUSHBUTTON_TEXT_CHANGE + }; + PushButton BTN_ACC_REMOVE + { + Pos = MAP_APPFONT ( 192 , 52 ) ; + Size = MAP_APPFONT ( 75 , 14 ) ; + TabStop = TRUE ; + Group = TRUE ; + PUSHBUTTON_TEXT_REMOVE + }; + FixedLine GRP_ACC_KEYBOARD + { + Pos = MAP_APPFONT ( 6 , 3 ) ; + Size = MAP_APPFONT ( 180 , 8 ) ; + Group = TRUE ; + Text [ en-US ] = "Shortcut keys"; + }; + Control BOX_ACC_ENTRIES + { + Border = TRUE ; + Pos = MAP_APPFONT ( 12 , 14 ) ; + Size = MAP_APPFONT ( 174 , 120 ) ; + TabStop = TRUE ; + Group = TRUE ; + HelpId = HID_ACCELCONFIG_LISTBOX ; + }; + FixedLine GRP_ACC_FUNCTIONS + { + Pos = MAP_APPFONT ( 6 , 140 ) ; + Size = MAP_APPFONT ( 258 , 8 ) ; + Group = TRUE ; + GROUPBOX_TEXT_FUNCTIONS + }; + FixedText TXT_ACC_GROUP + { + Pos = MAP_APPFONT ( 12 , 151 ) ; + Size = MAP_APPFONT ( 78 , 8 ) ; + Group = TRUE ; + Left = TRUE ; + FIXEDTEXT_TEXT_GROUP + }; + Control BOX_ACC_GROUP + { + Border = TRUE ; + Pos = MAP_APPFONT ( 12 , 161 ) ; + Size = MAP_APPFONT ( 78 , 91 ) ; + TabStop = TRUE ; + HelpId = HID_CONFIGGROUP_ACC_LISTBOX ; + }; + FixedText TXT_ACC_FUNCTION + { + Pos = MAP_APPFONT ( 93 , 151 ) ; + Size = MAP_APPFONT ( 88 , 8 ) ; + Left = TRUE ; + FIXEDTEXT_TEXT_FUNCTION + }; + Control BOX_ACC_FUNCTION + { + Border = TRUE ; + Pos = MAP_APPFONT ( 93 , 161 ) ; + Size = MAP_APPFONT ( 88 , 91 ) ; + TabStop = TRUE ; + HelpId = HID_CONFIGFUNCTION_ACC_LISTBOX ; + }; + FixedText TXT_ACC_KEY + { + Pos = MAP_APPFONT ( 184 , 151 ) ; + Size = MAP_APPFONT ( 80 , 8 ) ; + Text [ en-US ] = "~Keys" ; + Left = TRUE ; + }; + Control BOX_ACC_KEY + { + Border = TRUE ; + Pos = MAP_APPFONT ( 184 , 161 ) ; + Size = MAP_APPFONT ( 80 , 91 ) ; + TabStop = TRUE ; + }; + PushButton BTN_LOAD + { + Pos = MAP_APPFONT ( 192 , 86 ) ; + Size = MAP_APPFONT ( 75 , 14 ) ; + TabStop = TRUE ; + Group = TRUE ; + PUSHBUTTON_TEXT_LOAD + }; + PushButton BTN_SAVE + { + Pos = MAP_APPFONT ( 192 , 103 ) ; + Size = MAP_APPFONT ( 75 , 14 ) ; + TabStop = TRUE ; + Group = TRUE ; + PUSHBUTTON_TEXT_SAVE + }; + PushButton BTN_RESET + { + Pos = MAP_APPFONT ( 192 , 120 ) ; + Size = MAP_APPFONT ( 75 , 14 ) ; + TabStop = TRUE ; + Group = TRUE ; + PUSHBUTTON_TEXT_RESET + }; + String STR_LOADACCELCONFIG + { + Text [ en-US ] = "Load Keyboard Configuration" ; + }; + String STR_SAVEACCELCONFIG + { + Text [ en-US ] = "Save Keyboard Configuration" ; + }; + String STR_SFX_FILTERNAME_ALL + { + Text [ en-US ] = "All files (*.*)" ; + }; + String STR_FILTERNAME_CFG + { + Text [ en-US ] = "Configuration" ; + }; +}; + +Resource RID_SVXPAGE_CONFIGGROUPBOX +{ + String STR_MYMACROS + { + Text [ en-US ] = "My Macros"; + }; + String STR_PRODMACROS + { + Text [ en-US ] = "%PRODUCTNAME Macros"; + }; + String STR_BASICMACROS + { + Text [ en-US ] = "BASIC Macros" ; + }; + String STR_DLG_MACROS + { + Text [ en-US ] = "%PRODUCTNAME Macros" ; + }; + String STR_HUMAN_APPNAME + { + TEXT = "%PRODUCTNAME" ; + }; + String STR_GROUP_STYLES + { + Text [ en-US ] = "Styles" ; + }; + Image IMG_HARDDISK + { + ImageBitmap = Bitmap { File = "harddisk_16.bmp" ; }; + MASKCOLOR + }; + Image IMG_HARDDISK_HC + { + ImageBitmap = Bitmap { File = "harddisk_16_h.bmp" ; }; + MASKCOLOR + }; + Image IMG_LIB + { + ImageBitmap = Bitmap { File = "im30820.png"; }; + MASKCOLOR + }; + Image IMG_LIB_HC + { + ImageBitmap = Bitmap { File = "imh30820.png"; }; + MASKCOLOR + }; + Image IMG_MACRO + { + ImageBitmap = Bitmap { File = "im30821.png"; }; + MASKCOLOR + }; + Image IMG_MACRO_HC + { + ImageBitmap = Bitmap { File = "imh30821.png"; }; + MASKCOLOR + }; + Image IMG_DOC + { + ImageBitmap = Bitmap { File = "im30826.png"; }; + MASKCOLOR + }; + Image IMG_DOC_HC + { + ImageBitmap = Bitmap { File = "imh30826.png"; }; + MASKCOLOR + }; + String STR_BASICNAME + { + Text = "%PRODUCTNAME Basic" ; + }; + Image BMP_COLLAPSED + { + ImageBitmap = Bitmap + { + File = "plus.bmp" ; + }; + // MaskColor = Color { Predefine = COL_GREEN ; }; + }; + Image BMP_EXPANDED + { + ImageBitmap = Bitmap + { + File = "minus.bmp" ; + }; + // MaskColor = Color { Predefine = COL_GREEN ; }; + }; + Image BMP_EXPANDED_HC + { + ImageBitmap = Bitmap + { + File = "minus_h.bmp" ; + }; + }; + Image BMP_COLLAPSED_HC + { + ImageBitmap = Bitmap + { + File = "plus_h.bmp" ; + }; + }; +}; + + // ********************************************************************** EOF + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/svx/source/dialog/align.cxx b/svx/source/cui/align.cxx index e6e65efc31f2..e6e65efc31f2 100644 --- a/svx/source/dialog/align.cxx +++ b/svx/source/cui/align.cxx diff --git a/svx/source/dialog/align.hrc b/svx/source/cui/align.hrc index d9138200d381..d9138200d381 100644 --- a/svx/source/dialog/align.hrc +++ b/svx/source/cui/align.hrc diff --git a/svx/source/dialog/align.hxx b/svx/source/cui/align.hxx index db907d7d1750..db907d7d1750 100644 --- a/svx/source/dialog/align.hxx +++ b/svx/source/cui/align.hxx diff --git a/svx/source/dialog/align.src b/svx/source/cui/align.src index 24e88b77a8a0..24e88b77a8a0 100644 --- a/svx/source/dialog/align.src +++ b/svx/source/cui/align.src diff --git a/svx/source/dialog/autocdlg.cxx b/svx/source/cui/autocdlg.cxx index 577049c18bd6..5d957b831d54 100644 --- a/svx/source/dialog/autocdlg.cxx +++ b/svx/source/cui/autocdlg.cxx @@ -68,10 +68,10 @@ #include "helpid.hrc" #include "acorrcfg.hxx" #include <svx/svxacorr.hxx> -#include <svx/charmap.hxx> +#include "cuicharmap.hxx" #include "unolingu.hxx" #include <svx/dialmgr.hxx> -#include "cuicharmap.hxx" // add CHINA001 + static LanguageType eLastDialogLanguage = LANGUAGE_SYSTEM; using namespace ::com::sun::star::util; diff --git a/svx/source/dialog/autocdlg.hrc b/svx/source/cui/autocdlg.hrc index d3c34e3e48a2..d3c34e3e48a2 100644 --- a/svx/source/dialog/autocdlg.hrc +++ b/svx/source/cui/autocdlg.hrc diff --git a/svx/source/dialog/autocdlg.hxx b/svx/source/cui/autocdlg.hxx index d9d16f8ed064..d9d16f8ed064 100644 --- a/svx/source/dialog/autocdlg.hxx +++ b/svx/source/cui/autocdlg.hxx diff --git a/svx/source/dialog/autocdlg.src b/svx/source/cui/autocdlg.src index 9ec079a5daae..9ec079a5daae 100644 --- a/svx/source/dialog/autocdlg.src +++ b/svx/source/cui/autocdlg.src diff --git a/svx/source/dialog/backgrnd.cxx b/svx/source/cui/backgrnd.cxx index 6d9c06484658..6d9c06484658 100644 --- a/svx/source/dialog/backgrnd.cxx +++ b/svx/source/cui/backgrnd.cxx diff --git a/svx/source/dialog/backgrnd.hrc b/svx/source/cui/backgrnd.hrc index ce154afa54b6..ce154afa54b6 100644 --- a/svx/source/dialog/backgrnd.hrc +++ b/svx/source/cui/backgrnd.hrc diff --git a/svx/source/dialog/backgrnd.hxx b/svx/source/cui/backgrnd.hxx index 99e13cbfbdb0..e658c2ce0eb0 100644 --- a/svx/source/dialog/backgrnd.hxx +++ b/svx/source/cui/backgrnd.hxx @@ -42,10 +42,6 @@ #include <svtools/valueset.hxx> #include <svx/dlgctrl.hxx> -// Absatzvorlage -#define PARA_DEST_PARA 0 -#define PARA_DEST_CHAR 1 - // class SvxBackgroundTabPage -------------------------------------------- /* {k:\svx\prototyp\dialog\backgrnd.bmp} diff --git a/svx/source/dialog/backgrnd.src b/svx/source/cui/backgrnd.src index c89361a18ae3..c89361a18ae3 100644 --- a/svx/source/dialog/backgrnd.src +++ b/svx/source/cui/backgrnd.src diff --git a/svx/source/dialog/bbdlg.cxx b/svx/source/cui/bbdlg.cxx index bf711acdb22b..bf711acdb22b 100644 --- a/svx/source/dialog/bbdlg.cxx +++ b/svx/source/cui/bbdlg.cxx diff --git a/svx/source/dialog/bbdlg.hxx b/svx/source/cui/bbdlg.hxx index f2d7e25e9bf9..f2d7e25e9bf9 100644 --- a/svx/source/dialog/bbdlg.hxx +++ b/svx/source/cui/bbdlg.hxx diff --git a/svx/source/dialog/bbdlg.src b/svx/source/cui/bbdlg.src index 98b4bf01767e..98b4bf01767e 100644 --- a/svx/source/dialog/bbdlg.src +++ b/svx/source/cui/bbdlg.src diff --git a/svx/source/dialog/border.cxx b/svx/source/cui/border.cxx index b2ed7bc9ef02..b2ed7bc9ef02 100644 --- a/svx/source/dialog/border.cxx +++ b/svx/source/cui/border.cxx diff --git a/svx/source/dialog/border.hrc b/svx/source/cui/border.hrc index 7ba1b8cfc757..7ba1b8cfc757 100644 --- a/svx/source/dialog/border.hrc +++ b/svx/source/cui/border.hrc diff --git a/svx/source/dialog/border.hxx b/svx/source/cui/border.hxx index e01f2c803ff2..e01f2c803ff2 100644 --- a/svx/source/dialog/border.hxx +++ b/svx/source/cui/border.hxx diff --git a/svx/source/dialog/border.src b/svx/source/cui/border.src index 27f977a6dc3b..27f977a6dc3b 100644 --- a/svx/source/dialog/border.src +++ b/svx/source/cui/border.src diff --git a/svx/source/dialog/borderconn.cxx b/svx/source/cui/borderconn.cxx index c5455ecf6b10..7ed44720f989 100644 --- a/svx/source/dialog/borderconn.cxx +++ b/svx/source/cui/borderconn.cxx @@ -30,14 +30,13 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#include "borderconn.hxx" -#include <svx/frmsel.hxx> - - - - +#ifdef SVX_DLLIMPLEMENTATION +#undef SVX_DLLIMPLEMENTATION +#endif +#include "borderconn.hxx" +#include <svx/frmsel.hxx> #include "bolnitem.hxx" #include <svx/boxitem.hxx> #include <svx/algitem.hxx> diff --git a/svx/source/dialog/borderconn.hxx b/svx/source/cui/borderconn.hxx index 381d18bcbfa2..740c9c79f283 100644 --- a/svx/source/dialog/borderconn.hxx +++ b/svx/source/cui/borderconn.hxx @@ -33,7 +33,6 @@ #include <sfx2/itemconnect.hxx> #include <svx/framebordertype.hxx> -#include "svx/svxdllapi.h" class SfxItemSet; class MetricField; @@ -48,7 +47,7 @@ class FrameSelector; /** Creates an item connection object that connects an SvxLineItem with an svx::FrameSelector control. */ -SVX_DLLPUBLIC sfx::ItemConnectionBase* CreateFrameLineConnection( USHORT nSlot, +sfx::ItemConnectionBase* CreateFrameLineConnection( USHORT nSlot, FrameSelector& rFrameSel, FrameBorderType eBorder, sfx::ItemConnFlags nFlags = sfx::ITEMCONN_DEFAULT ); @@ -61,14 +60,14 @@ sfx::ItemConnectionBase* CreateFrameBoxConnection( /** Creates an item connection object that connects an SvxMarginItem with the controls of the SvxBorderTabPage. */ -SVX_DLLPUBLIC sfx::ItemConnectionBase* CreateMarginConnection( const SfxItemSet& rItemSet, +sfx::ItemConnectionBase* CreateMarginConnection( const SfxItemSet& rItemSet, MetricField& rMfLeft, MetricField& rMfRight, MetricField& rMfTop, MetricField& rMfBottom, sfx::ItemConnFlags nFlags = sfx::ITEMCONN_DEFAULT ); /** Creates an item connection object that connects an SvxShadowItem with the controls of the SvxBorderTabPage. */ -SVX_DLLPUBLIC sfx::ItemConnectionBase* CreateShadowConnection( const SfxItemSet& rItemSet, +sfx::ItemConnectionBase* CreateShadowConnection( const SfxItemSet& rItemSet, ValueSet& rVsPos, MetricField& rMfSize, ColorListBox& rLbColor, sfx::ItemConnFlags nFlags = sfx::ITEMCONN_DEFAULT ); diff --git a/svx/source/dialog/cfg.cxx b/svx/source/cui/cfg.cxx index 9b2dca755453..346fb0bb5d1e 100644 --- a/svx/source/dialog/cfg.cxx +++ b/svx/source/cui/cfg.cxx @@ -73,10 +73,10 @@ #include "cfg.hrc" #include "helpid.hrc" +#include "acccfg.hxx" #include "cfg.hxx" #include "eventdlg.hxx" #include <svx/dialmgr.hxx> -#include <svx/svxdlg.hxx> #include <comphelper/documentinfo.hxx> #include <comphelper/processfactory.hxx> @@ -108,6 +108,8 @@ #include <com/sun/star/frame/FrameSearchFlag.hpp> #include <com/sun/star/embed/ElementModes.hpp> +#include "dlgname.hxx" + #define PRTSTR(x) rtl::OUStringToOString(x, RTL_TEXTENCODING_ASCII_US).pData->buffer #define ENTRY_HEIGHT 16 @@ -802,7 +804,7 @@ SfxTabPage *CreateSvxMenuConfigPage( Window *pParent, const SfxItemSet& rSet ) SfxTabPage *CreateKeyboardConfigPage( Window *pParent, const SfxItemSet& rSet ) { - return SfxAbstractDialogFactory::CreateSfxAcceleratorConfigPage( pParent, rSet ); + return new SfxAcceleratorConfigPage( pParent, rSet ); } SfxTabPage *CreateSvxToolbarConfigPage( Window *pParent, const SfxItemSet& rSet ) @@ -2629,13 +2631,7 @@ IMPL_LINK( SvxMenuConfigPage, MenuSelectHdl, MenuButton *, pButton ) String aNewName( stripHotKey( pMenuData->GetName() ) ); String aDesc = SVX_RESSSTR( RID_SVXSTR_LABEL_NEW_NAME ); - SvxAbstractDialogFactory* pFact = - SvxAbstractDialogFactory::Create(); - - AbstractSvxNameDialog* pNameDialog = - pFact->CreateSvxNameDialog( - 0, aNewName, aDesc, RID_SVXDLG_NAME ); - + SvxNameDialog* pNameDialog = new SvxNameDialog( this, aNewName, aDesc ); pNameDialog->SetHelpId( HID_SVX_CONFIG_RENAME_MENU ); pNameDialog->SetText( SVX_RESSTR( RID_SVXSTR_RENAME_MENU ) ); @@ -2693,13 +2689,7 @@ IMPL_LINK( SvxMenuConfigPage, EntrySelectHdl, MenuButton *, pButton ) String aNewName; String aDesc = SVX_RESSSTR( RID_SVXSTR_SUBMENU_NAME ); - SvxAbstractDialogFactory* pFact = - SvxAbstractDialogFactory::Create(); - - AbstractSvxNameDialog* pNameDialog = - pFact->CreateSvxNameDialog( - 0, aNewName, aDesc, RID_SVXDLG_NAME ); - + SvxNameDialog* pNameDialog = new SvxNameDialog( this, aNewName, aDesc ); pNameDialog->SetHelpId( HID_SVX_CONFIG_NAME_SUBMENU ); pNameDialog->SetText( SVX_RESSTR( RID_SVXSTR_ADD_SUBMENU ) ); @@ -2745,13 +2735,7 @@ IMPL_LINK( SvxMenuConfigPage, EntrySelectHdl, MenuButton *, pButton ) String aNewName( stripHotKey( pEntry->GetName() ) ); String aDesc = SVX_RESSSTR( RID_SVXSTR_LABEL_NEW_NAME ); - SvxAbstractDialogFactory* pFact = - SvxAbstractDialogFactory::Create(); - - AbstractSvxNameDialog* pNameDialog = - pFact->CreateSvxNameDialog( - 0, aNewName, aDesc, RID_SVXDLG_NAME ); - + SvxNameDialog* pNameDialog = new SvxNameDialog( this, aNewName, aDesc ); pNameDialog->SetHelpId( HID_SVX_CONFIG_RENAME_MENU_ITEM ); pNameDialog->SetText( SVX_RESSTR( RID_SVXSTR_RENAME_MENU ) ); @@ -3589,13 +3573,7 @@ IMPL_LINK( SvxToolbarConfigPage, ToolbarSelectHdl, MenuButton *, pButton ) String aNewName( stripHotKey( pToolbar->GetName() ) ); String aDesc = SVX_RESSSTR( RID_SVXSTR_LABEL_NEW_NAME ); - SvxAbstractDialogFactory* pFact = - SvxAbstractDialogFactory::Create(); - - AbstractSvxNameDialog* pNameDialog = - pFact->CreateSvxNameDialog( - 0, aNewName, aDesc, RID_SVXDLG_NAME ); - + SvxNameDialog* pNameDialog = new SvxNameDialog( this, aNewName, aDesc ); pNameDialog->SetHelpId( HID_SVX_CONFIG_RENAME_TOOLBAR ); pNameDialog->SetText( SVX_RESSTR( RID_SVXSTR_RENAME_TOOLBAR ) ); @@ -3686,13 +3664,7 @@ IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton ) String aNewName( stripHotKey( pEntry->GetName() ) ); String aDesc = SVX_RESSSTR( RID_SVXSTR_LABEL_NEW_NAME ); - SvxAbstractDialogFactory* pFact = - SvxAbstractDialogFactory::Create(); - - AbstractSvxNameDialog* pNameDialog = - pFact->CreateSvxNameDialog( - 0, aNewName, aDesc, RID_SVXDLG_NAME ); - + SvxNameDialog* pNameDialog = new SvxNameDialog( this, aNewName, aDesc ); pNameDialog->SetHelpId( HID_SVX_CONFIG_RENAME_TOOLBAR_ITEM ); pNameDialog->SetText( SVX_RESSTR( RID_SVXSTR_RENAME_TOOLBAR ) ); diff --git a/svx/source/dialog/cfg.hrc b/svx/source/cui/cfg.hrc index 49c155ef96bf..49c155ef96bf 100644 --- a/svx/source/dialog/cfg.hrc +++ b/svx/source/cui/cfg.hrc diff --git a/svx/source/dialog/cfg.hxx b/svx/source/cui/cfg.hxx index 9b528576935b..c52b92ce2a0a 100644 --- a/svx/source/dialog/cfg.hxx +++ b/svx/source/cui/cfg.hxx @@ -38,10 +38,7 @@ #include <vcl/toolbox.hxx> #include <svtools/svtreebx.hxx> #include <svtools/svmedit2.hxx> -//add by shizhoubo -#ifndef _SVTOOLS_SVMEDIT2_HXX #include <svtools/svmedit.hxx> -#endif #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/container/XIndexContainer.hpp> #include <com/sun/star/container/XNameAccess.hpp> @@ -54,7 +51,6 @@ #include <com/sun/star/frame/XStorable.hpp> #include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/lang/XSingleComponentFactory.hpp> -#include "svx/svxdllapi.h" #define _SVSTDARR_USHORTS #define _SVSTDARR_STRINGSDTOR @@ -73,7 +69,7 @@ class SvxToolbarConfigPage; typedef std::vector< SvxConfigEntry* > SvxEntries; -class SVX_DLLPUBLIC SvxConfigDialog : public SfxTabDialog +class SvxConfigDialog : public SfxTabDialog { private: ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xFrame; diff --git a/svx/source/dialog/cfg.src b/svx/source/cui/cfg.src index 69f1ccc9c61f..69f1ccc9c61f 100644 --- a/svx/source/dialog/cfg.src +++ b/svx/source/cui/cfg.src diff --git a/svx/source/dialog/cfgchart.cxx b/svx/source/cui/cfgchart.cxx index 344bca7fbd10..344bca7fbd10 100644 --- a/svx/source/dialog/cfgchart.cxx +++ b/svx/source/cui/cfgchart.cxx diff --git a/svx/source/dialog/cfgchart.hxx b/svx/source/cui/cfgchart.hxx index 86a2490a2cf8..86a2490a2cf8 100644 --- a/svx/source/dialog/cfgchart.hxx +++ b/svx/source/cui/cfgchart.hxx diff --git a/svx/source/cui/cfgutil.cxx b/svx/source/cui/cfgutil.cxx new file mode 100644 index 000000000000..6e1f115ebc53 --- /dev/null +++ b/svx/source/cui/cfgutil.cxx @@ -0,0 +1,1801 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: cfg.cxx,v $ + * $Revision: 1.65 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_svx.hxx" + +#include "cfgutil.hxx" + +#include <com/sun/star/beans/XPropertySet.hpp> +#include <com/sun/star/frame/XDispatchInformationProvider.hpp> +#include <com/sun/star/uno/RuntimeException.hpp> +#include <com/sun/star/script/provider/XScriptProviderSupplier.hpp> +#include <com/sun/star/script/provider/XScriptProvider.hpp> +#include <com/sun/star/script/browse/XBrowseNode.hpp> +#include <com/sun/star/script/browse/BrowseNodeTypes.hpp> + +#include <com/sun/star/script/browse/XBrowseNodeFactory.hpp> +#include <com/sun/star/script/browse/BrowseNodeFactoryViewTypes.hpp> +#include <com/sun/star/frame/XModuleManager.hpp> +#include <com/sun/star/frame/XDesktop.hpp> +#include <com/sun/star/container/XEnumerationAccess.hpp> +#include <com/sun/star/container/XEnumeration.hpp> +#include <com/sun/star/document/XDocumentInfoSupplier.hpp> +#include <com/sun/star/document/XScriptInvocationContext.hpp> +#include <com/sun/star/style/XStyleFamiliesSupplier.hpp> + +#include "acccfg.hrc" +#include "helpid.hrc" +#include <basic/sbx.hxx> +#include <basic/basicmanagerrepository.hxx> +#include <basic/sbstar.hxx> +#include <basic/sbxmeth.hxx> +#include <basic/sbmod.hxx> +#include <basic/basmgr.hxx> +#include <tools/urlobj.hxx> +#include "svx/dialogs.hrc" +#include <sfx2/app.hxx> +#include <sfx2/macrconf.hxx> +#include <sfx2/minfitem.hxx> +#include <unotools/processfactory.hxx> +#include <comphelper/documentinfo.hxx> +#include <svtools/imagemgr.hxx> +#include <rtl/ustrbuf.hxx> +#include <comphelper/sequenceashashmap.hxx> +#include <unotools/configmgr.hxx> +#include "svx/dialmgr.hxx" +#include <svtools/stritem.hxx> + +#define _SVSTDARR_STRINGSDTOR +#include <svtools/svstdarr.hxx> + +using namespace ::com::sun::star; +using namespace ::com::sun::star::uno; +using namespace ::com::sun::star::script; +using namespace ::com::sun::star::frame; +using namespace ::com::sun::star::document; +namespace css = ::com::sun::star; + +static ::rtl::OUString SERVICE_UICATEGORYDESCRIPTION = ::rtl::OUString::createFromAscii("com.sun.star.ui.UICategoryDescription" ); +static ::rtl::OUString SERVICE_UICMDDESCRIPTION = ::rtl::OUString::createFromAscii("com.sun.star.frame.UICommandDescription"); + +SfxStylesInfo_Impl::SfxStylesInfo_Impl() +{} + +void SfxStylesInfo_Impl::setModel(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel) +{ + m_xDoc = xModel; +} + +static ::rtl::OUString FAMILY_CHARACTERSTYLE = ::rtl::OUString::createFromAscii("CharacterStyles"); +static ::rtl::OUString FAMILY_PARAGRAPHSTYLE = ::rtl::OUString::createFromAscii("ParagraphStyles"); +static ::rtl::OUString FAMILY_FRAMESTYLE = ::rtl::OUString::createFromAscii("FrameStyles" ); +static ::rtl::OUString FAMILY_PAGESTYLE = ::rtl::OUString::createFromAscii("PageStyles" ); +static ::rtl::OUString FAMILY_NUMBERINGSTYLE = ::rtl::OUString::createFromAscii("NumberingStyles"); + +static ::rtl::OUString CMDURL_SPART = ::rtl::OUString::createFromAscii(".uno:StyleApply?Style:string="); +static ::rtl::OUString CMDURL_FPART2 = ::rtl::OUString::createFromAscii("&FamilyName:string="); + +static ::rtl::OUString CMDURL_STYLEPROT_ONLY = ::rtl::OUString::createFromAscii(".uno:StyleApply?"); +static ::rtl::OUString CMDURL_SPART_ONLY = ::rtl::OUString::createFromAscii("Style:string="); +static ::rtl::OUString CMDURL_FPART_ONLY = ::rtl::OUString::createFromAscii("FamilyName:string="); + +static ::rtl::OUString STYLEPROP_UINAME = ::rtl::OUString::createFromAscii("DisplayName"); + +::rtl::OUString SfxStylesInfo_Impl::generateCommand(const ::rtl::OUString& sFamily, const ::rtl::OUString& sStyle) +{ + ::rtl::OUStringBuffer sCommand(1024); + sCommand.append(CMDURL_SPART ); + sCommand.append(sStyle ); + sCommand.append(CMDURL_FPART2); + sCommand.append(sFamily ); + return sCommand.makeStringAndClear(); +} + +sal_Bool SfxStylesInfo_Impl::parseStyleCommand(SfxStyleInfo_Impl& aStyle) +{ + static sal_Int32 LEN_STYLEPROT = CMDURL_STYLEPROT_ONLY.getLength(); + static sal_Int32 LEN_SPART = CMDURL_SPART_ONLY.getLength(); + static sal_Int32 LEN_FPART = CMDURL_FPART_ONLY.getLength(); + + if (aStyle.sCommand.indexOf(CMDURL_STYLEPROT_ONLY, 0) != 0) + return sal_False; + + aStyle.sFamily = ::rtl::OUString(); + aStyle.sStyle = ::rtl::OUString(); + + sal_Int32 nCmdLen = aStyle.sCommand.getLength(); + ::rtl::OUString sCmdArgs = aStyle.sCommand.copy(LEN_STYLEPROT, nCmdLen-LEN_STYLEPROT); + sal_Int32 i = sCmdArgs.indexOf('&'); + if (i<0) + return sal_False; + + ::rtl::OUString sArg = sCmdArgs.copy(0, i); + if (sArg.indexOf(CMDURL_SPART_ONLY) == 0) + aStyle.sStyle = sArg.copy(LEN_SPART, sArg.getLength()-LEN_SPART); + else + if (sArg.indexOf(CMDURL_FPART_ONLY) == 0) + aStyle.sFamily = sArg.copy(LEN_FPART, sArg.getLength()-LEN_FPART); + + sArg = sCmdArgs.copy(i+1, sCmdArgs.getLength()-i-1); + if (sArg.indexOf(CMDURL_SPART_ONLY) == 0) + aStyle.sStyle = sArg.copy(LEN_SPART, sArg.getLength()-LEN_SPART); + else + if (sArg.indexOf(CMDURL_FPART_ONLY) == 0) + aStyle.sFamily = sArg.copy(LEN_FPART, sArg.getLength()-LEN_FPART); + + if (aStyle.sFamily.getLength() && aStyle.sStyle.getLength()) + return sal_True; + + return sal_False; +} + +void SfxStylesInfo_Impl::getLabel4Style(SfxStyleInfo_Impl& aStyle) +{ + try + { + css::uno::Reference< css::style::XStyleFamiliesSupplier > xModel(m_xDoc, css::uno::UNO_QUERY); + + css::uno::Reference< css::container::XNameAccess > xFamilies; + if (xModel.is()) + xFamilies = xModel->getStyleFamilies(); + + css::uno::Reference< css::container::XNameAccess > xStyleSet; + if (xFamilies.is()) + xFamilies->getByName(aStyle.sFamily) >>= xStyleSet; + + css::uno::Reference< css::beans::XPropertySet > xStyle; + if (xStyleSet.is()) + xStyleSet->getByName(aStyle.sStyle) >>= xStyle; + + aStyle.sLabel = ::rtl::OUString(); + if (xStyle.is()) + xStyle->getPropertyValue(STYLEPROP_UINAME) >>= aStyle.sLabel; + } + catch(const css::uno::RuntimeException& exRun) + { throw exRun; } + catch(const css::uno::Exception&) + { aStyle.sLabel = ::rtl::OUString(); } + + if (!aStyle.sLabel.getLength()) + { + aStyle.sLabel = aStyle.sCommand; + /* + #if OSL_DEBUG_LEVEL > 1 + ::rtl::OUStringBuffer sMsg(256); + sMsg.appendAscii("There is no UIName for the style command \""); + sMsg.append (aStyle.sCommand ); + sMsg.appendAscii("\". The UI will be invalid then ..." ); + OSL_ENSURE(sal_False, ::rtl::OUStringToOString(sMsg.makeStringAndClear(), RTL_TEXTENCODING_UTF8).getStr()); + #endif + */ + } +} + +::std::vector< SfxStyleInfo_Impl > SfxStylesInfo_Impl::getStyleFamilies() +{ + // Its an optional interface! + css::uno::Reference< css::style::XStyleFamiliesSupplier > xModel(m_xDoc, css::uno::UNO_QUERY); + if (!xModel.is()) + return ::std::vector< SfxStyleInfo_Impl >(); + + css::uno::Reference< css::container::XNameAccess > xCont = xModel->getStyleFamilies(); + css::uno::Sequence< ::rtl::OUString > lFamilyNames = xCont->getElementNames(); + ::std::vector< SfxStyleInfo_Impl > lFamilies; + sal_Int32 c = lFamilyNames.getLength(); + sal_Int32 i = 0; + for(i=0; i<c; ++i) + { + SfxStyleInfo_Impl aFamilyInfo; + aFamilyInfo.sFamily = lFamilyNames[i]; + + try + { + css::uno::Reference< css::beans::XPropertySet > xFamilyInfo; + xCont->getByName(aFamilyInfo.sFamily) >>= xFamilyInfo; + if (!xFamilyInfo.is()) + { + // TODO_AS currently there is no support for an UIName property .. use internal family name instead + aFamilyInfo.sLabel = aFamilyInfo.sFamily; + } + else + xFamilyInfo->getPropertyValue(STYLEPROP_UINAME) >>= aFamilyInfo.sLabel; + } + catch(const css::uno::RuntimeException& exRun) + { throw exRun; } + catch(const css::uno::Exception&) + { return ::std::vector< SfxStyleInfo_Impl >(); } + + lFamilies.push_back(aFamilyInfo); + } + + return lFamilies; +} + +::std::vector< SfxStyleInfo_Impl > SfxStylesInfo_Impl::getStyles(const ::rtl::OUString& sFamily) +{ + static ::rtl::OUString PROP_UINAME = ::rtl::OUString::createFromAscii("DisplayName"); + + css::uno::Sequence< ::rtl::OUString > lStyleNames; + css::uno::Reference< css::style::XStyleFamiliesSupplier > xModel(m_xDoc, css::uno::UNO_QUERY_THROW); + css::uno::Reference< css::container::XNameAccess > xFamilies = xModel->getStyleFamilies(); + css::uno::Reference< css::container::XNameAccess > xStyleSet; + try + { + xFamilies->getByName(sFamily) >>= xStyleSet; + lStyleNames = xStyleSet->getElementNames(); + } + catch(const css::uno::RuntimeException& exRun) + { throw exRun; } + catch(const css::uno::Exception&) + { return ::std::vector< SfxStyleInfo_Impl >(); } + + ::std::vector< SfxStyleInfo_Impl > lStyles; + sal_Int32 c = lStyleNames.getLength(); + sal_Int32 i = 0; + for (i=0; i<c; ++i) + { + SfxStyleInfo_Impl aStyleInfo; + aStyleInfo.sFamily = sFamily; + aStyleInfo.sStyle = lStyleNames[i]; + aStyleInfo.sCommand = SfxStylesInfo_Impl::generateCommand(aStyleInfo.sFamily, aStyleInfo.sStyle); + + try + { + css::uno::Reference< css::beans::XPropertySet > xStyle; + xStyleSet->getByName(aStyleInfo.sStyle) >>= xStyle; + if (!xStyle.is()) + continue; + xStyle->getPropertyValue(PROP_UINAME) >>= aStyleInfo.sLabel; + } + catch(const css::uno::RuntimeException& exRun) + { throw exRun; } + catch(const css::uno::Exception&) + { continue; } + + lStyles.push_back(aStyleInfo); + } + return lStyles; +} +SV_IMPL_PTRARR(SfxGroupInfoArr_Impl, SfxGroupInfoPtr); +SfxConfigFunctionListBox_Impl::SfxConfigFunctionListBox_Impl( Window* pParent, const ResId& rResId) + : SvTreeListBox( pParent, rResId ) + , pCurEntry( 0 ) + , pStylesInfo( 0 ) +{ + SetWindowBits( GetStyle() | WB_CLIPCHILDREN | WB_HSCROLL | WB_SORT ); + GetModel()->SetSortMode( SortAscending ); + + // Timer f"ur die BallonHelp + aTimer.SetTimeout( 200 ); + aTimer.SetTimeoutHdl( + LINK( this, SfxConfigFunctionListBox_Impl, TimerHdl ) ); +} + +SfxConfigFunctionListBox_Impl::~SfxConfigFunctionListBox_Impl() +{ + ClearAll(); +} + +void SfxConfigFunctionListBox_Impl::MouseMove( const MouseEvent& ) +{ + /* --> PB 2004-12-01 #i37000# - no own help text needed any longer + Point aMousePos = rMEvt.GetPosPixel(); + pCurEntry = GetCurEntry(); + + if ( pCurEntry && GetEntry( aMousePos ) == pCurEntry ) + aTimer.Start(); + else + { + Help::ShowBalloon( this, aMousePos, String() ); + aTimer.Stop(); + } + */ +} + + +IMPL_LINK( SfxConfigFunctionListBox_Impl, TimerHdl, Timer*, pTimer) +/* Beschreibung + Timer-Handler f"ur die Einblendung eines Hilfetextes. Wenn nach Ablauf des Timers + der Mauszeiger immer noch auf dem aktuell selektierten Eintrag steht, wird der + Helptext des Entries als Balloon-Help eingeblendet. +*/ +{ + (void)pTimer; // unused + /* --> PB 2004-12-01 #i37000# - no own help text needed any longer + aTimer.Stop(); + Point aMousePos = GetPointerPosPixel(); + SvLBoxEntry *pEntry = GetCurEntry(); + if ( pEntry && GetEntry( aMousePos ) == pEntry && pCurEntry == pEntry ) + { + String sHelpText = GetHelpText( pEntry ); + Help::ShowBalloon( this, OutputToScreenPixel( aMousePos ), sHelpText ); + } + */ + return 0L; +} + +void SfxConfigFunctionListBox_Impl::ClearAll() +/* Beschreibung + L"oscht alle Eintr"age in der FunctionListBox, alle UserDaten und alle evtl. + vorhandenen MacroInfos. +*/ +{ + USHORT nCount = aArr.Count(); + for ( USHORT i=0; i<nCount; i++ ) + { + SfxGroupInfo_Impl *pData = aArr[i]; + + if ( pData->nKind == SFX_CFGFUNCTION_MACRO || + pData->nKind == SFX_CFGFUNCTION_SCRIPT ) + { + SfxMacroInfo *pInfo = (SfxMacroInfo*) pData->pObject; + SFX_APP()->GetMacroConfig()->ReleaseSlotId( pInfo->GetSlotId() ); + delete pInfo; + } + + if ( pData->nKind == SFX_CFGGROUP_SCRIPTCONTAINER + || pData->nKind == SFX_CFGGROUP_DOCBASICMGR + ) + { + XInterface* xi = static_cast<XInterface *>(pData->pObject); + if (xi != NULL) + { + xi->release(); + } + } + + delete pData; + } + + aArr.Remove( 0, nCount ); + Clear(); +} + +SvLBoxEntry* SfxConfigFunctionListBox_Impl::GetEntry_Impl( const String& rName ) +/* Beschreibung + Ermittelt den SvLBoxEntry zu einem "ubergebenen String. Das setzt voraus, da\s + die Namen eindeutig sind. +*/ +{ + SvLBoxEntry *pEntry = First(); + while ( pEntry ) + { + if ( GetEntryText( pEntry ) == rName ) + return pEntry; + pEntry = Next( pEntry ); + } + + return NULL; +} + +SvLBoxEntry* SfxConfigFunctionListBox_Impl::GetEntry_Impl( USHORT nId ) +/* Beschreibung + Ermittelt den SvLBoxEntry zu einer "ubergebenen Id. +*/ +{ + SvLBoxEntry *pEntry = First(); + while ( pEntry ) + { + SfxGroupInfo_Impl *pData = (SfxGroupInfo_Impl*) pEntry->GetUserData(); + if ( pData && pData->nOrd == nId ) + return pEntry; + pEntry = Next( pEntry ); + } + + return NULL; +} + +SfxMacroInfo* SfxConfigFunctionListBox_Impl::GetMacroInfo() +/* Beschreibung + Gibt die MacroInfo des selektierten Entry zur"uck ( sofern vorhanden ). +*/ +{ + SvLBoxEntry *pEntry = FirstSelected(); + if ( pEntry ) + { + SfxGroupInfo_Impl *pData = (SfxGroupInfo_Impl*) pEntry->GetUserData(); + if ( pData && ( pData->nKind == SFX_CFGFUNCTION_MACRO || + pData->nKind == SFX_CFGFUNCTION_SCRIPT ) ) + return (SfxMacroInfo*) pData->pObject; + } + + return 0; +} + +String SfxConfigFunctionListBox_Impl::GetCurCommand() +{ + SvLBoxEntry *pEntry = FirstSelected(); + if (!pEntry) + return String(); + SfxGroupInfo_Impl *pData = (SfxGroupInfo_Impl*) pEntry->GetUserData(); + if (!pData) + return String(); + return pData->sCommand; +} + +String SfxConfigFunctionListBox_Impl::GetCurLabel() +{ + SvLBoxEntry *pEntry = FirstSelected(); + if (!pEntry) + return String(); + SfxGroupInfo_Impl *pData = (SfxGroupInfo_Impl*) pEntry->GetUserData(); + if (!pData) + return String(); + if (pData->sLabel.Len()) + return pData->sLabel; + return pData->sCommand; +} + +USHORT SfxConfigFunctionListBox_Impl::GetId( SvLBoxEntry *pEntry ) +/* Beschreibung + Gibt die Ordnungsnummer ( SlotId oder Macro-Nummer ) des Eintrags zur"uck. +*/ +{ + SfxGroupInfo_Impl *pData = pEntry ? + (SfxGroupInfo_Impl*) pEntry->GetUserData() : 0; + if ( pData ) + return pData->nOrd; + return 0; +} + +/* +String SfxConfigFunctionListBox_Impl::GetHelpText( SvLBoxEntry *pEntry ) +{ + // Information zum selektierten Entry aus den Userdaten holen + SfxGroupInfo_Impl *pInfo = pEntry ? (SfxGroupInfo_Impl*) pEntry->GetUserData(): 0; + if ( pInfo ) + { + switch ( pInfo->nKind ) + { + case SFX_CFGGROUP_FUNCTION : + case SFX_CFGFUNCTION_SLOT : + { + // Eintrag ist eine Funktion, Hilfe aus der Office-Hilfe + USHORT nId = pInfo->nOrd; + String aText = Application::GetHelp()->GetHelpText( nId, this ); + + if ( !aText.Len() ) + aText = SFX_SLOTPOOL().GetSlotHelpText_Impl( nId ); + return aText; + } + + case SFX_CFGGROUP_SCRIPTCONTAINER : + case SFX_CFGFUNCTION_SCRIPT : + case SFX_CFGGROUP_BASICMGR : + case SFX_CFGGROUP_DOCBASICMGR : + case SFX_CFGGROUP_BASICLIB : + case SFX_CFGGROUP_BASICMOD : + case SFX_CFGFUNCTION_MACRO : + { + // Eintrag ist ein Macro, Hilfe aus der MacroInfo + SfxMacroInfo *pMacInfo = (SfxMacroInfo*) pInfo->pObject; + return pMacInfo->GetHelpText(); + } + + case SFX_CFGGROUP_STYLES : + return String(); + } + } + + return String(); +}*/ + +void SfxConfigFunctionListBox_Impl::FunctionSelected() +/* Beschreibung + Setzt die Balloonhelp zur"uck, da diese immer den Helptext des selektierten + Entry anzeigen soll. +*/ +{ + /* --> PB 2004-12-01 #i37000# - no own help text needed any longer + Help::ShowBalloon( this, Point(), String() ); + */ +} + +void SfxConfigFunctionListBox_Impl::SetStylesInfo(SfxStylesInfo_Impl* pStyles) +{ + pStylesInfo = pStyles; +} + +struct SvxConfigGroupBoxResource_Impl : public Resource +{ + Image m_hdImage; + Image m_hdImage_hc; + Image m_libImage; + Image m_libImage_hc; + Image m_macImage; + Image m_macImage_hc; + Image m_docImage; + Image m_docImage_hc; + ::rtl::OUString m_sMyMacros; + ::rtl::OUString m_sProdMacros; + String m_sMacros; + String m_sDlgMacros; + String m_aHumanAppName; + String m_aStrGroupStyles; + String m_aScriptType; + Image m_collapsedImage; + Image m_collapsedImage_hc; + Image m_expandedImage; + Image m_expandedImage_hc; + + SvxConfigGroupBoxResource_Impl(); +}; + +SvxConfigGroupBoxResource_Impl::SvxConfigGroupBoxResource_Impl() : + Resource(SVX_RES(RID_SVXPAGE_CONFIGGROUPBOX)), + m_hdImage(SVX_RES(IMG_HARDDISK)), + m_hdImage_hc(SVX_RES(IMG_HARDDISK_HC)), + m_libImage(SVX_RES(IMG_LIB)), + m_libImage_hc(SVX_RES(IMG_LIB_HC)), + m_macImage(SVX_RES(IMG_MACRO)), + m_macImage_hc(SVX_RES(IMG_MACRO_HC)), + m_docImage(SVX_RES(IMG_DOC)), + m_docImage_hc(SVX_RES(IMG_DOC_HC)), + m_sMyMacros(String(SVX_RES(STR_MYMACROS))), + m_sProdMacros(String(SVX_RES(STR_PRODMACROS))), + m_sMacros(String(SVX_RES(STR_BASICMACROS))), + m_sDlgMacros(String(SVX_RES(STR_DLG_MACROS))), + m_aHumanAppName(String(SVX_RES(STR_HUMAN_APPNAME))), + m_aStrGroupStyles(String(SVX_RES(STR_GROUP_STYLES))), + m_aScriptType(String(SVX_RES(STR_BASICNAME))), + m_collapsedImage(SVX_RES(BMP_COLLAPSED)), + m_collapsedImage_hc(SVX_RES(BMP_COLLAPSED_HC)), + m_expandedImage(SVX_RES(BMP_EXPANDED)), + m_expandedImage_hc(SVX_RES(BMP_EXPANDED_HC)) +{ + FreeResource(); +} + +SfxConfigGroupListBox_Impl::SfxConfigGroupListBox_Impl( + Window* pParent, const ResId& rResId, ULONG nConfigMode ) + : SvTreeListBox( pParent, rResId ) + , pImp(new SvxConfigGroupBoxResource_Impl()), pFunctionListBox(0), nMode( nConfigMode ), bShowSF( FALSE ), bShowBasic( TRUE ), pStylesInfo(0) +{ + SetWindowBits( GetStyle() | WB_CLIPCHILDREN | WB_HSCROLL | WB_HASBUTTONS | WB_HASLINES | WB_HASLINESATROOT | WB_HASBUTTONSATROOT ); + SetNodeBitmaps( pImp->m_collapsedImage, pImp->m_expandedImage, BMP_COLOR_NORMAL ); + SetNodeBitmaps( pImp->m_collapsedImage_hc, pImp->m_expandedImage_hc, BMP_COLOR_HIGHCONTRAST ); + + // Check configuration to see whether only Basic macros, + // only Scripting Framework scripts, or both should be listed + Any value; + sal_Bool tmp = false; + + value = ::utl::ConfigManager::GetConfigManager()->GetLocalProperty( + ::rtl::OUString::createFromAscii( + "Office.Scripting/ScriptDisplaySettings/ShowBasic" ) ); + + value >>= tmp; + + if (tmp == sal_True) { + bShowBasic = TRUE; + } + else { + bShowBasic = FALSE; + } + + value = ::utl::ConfigManager::GetConfigManager()->GetLocalProperty( + ::rtl::OUString::createFromAscii( + "Office.Scripting/ScriptDisplaySettings/ShowSF" ) ); + + value >>= tmp; + + if (tmp == sal_True) { + bShowSF = TRUE; + } + else { + bShowSF = FALSE; + } +} + + +SfxConfigGroupListBox_Impl::~SfxConfigGroupListBox_Impl() +{ + ClearAll(); +} + +void SfxConfigGroupListBox_Impl::ClearAll() +{ + USHORT nCount = aArr.Count(); + for ( USHORT i=0; i<nCount; i++ ) + { + SfxGroupInfo_Impl *pData = aArr[i]; + if ( pData->nKind == SFX_CFGGROUP_SCRIPTCONTAINER + || pData->nKind == SFX_CFGGROUP_DOCBASICMGR + ) + { + XInterface* xi = static_cast<XInterface *>(pData->pObject); + if (xi != NULL) + { + xi->release(); + } + } + delete pData; + } + + aArr.Remove( 0, nCount ); + Clear(); +} + +void SfxConfigGroupListBox_Impl::SetScriptType( const String& rScriptType ) +{ + pImp->m_aScriptType = rScriptType; + ULONG nPos=0; + SvLBoxEntry *pEntry = (SvLBoxEntry*) GetModel()->GetEntryAtAbsPos( nPos++ ); + while ( pEntry ) + { + SfxGroupInfo_Impl *pInfo = (SfxGroupInfo_Impl*) pEntry->GetUserData(); + if ( pInfo->nKind == SFX_CFGGROUP_BASICLIB && ( IsExpanded( pEntry ) || pInfo->bWasOpened ) ) + { + Collapse( pEntry ); + SvLBoxEntry *pChild = FirstChild( pEntry ); + while (pChild) + { + GetModel()->Remove( pChild ); + pChild = FirstChild( pEntry ); + } + + Expand( pEntry ); + } + + pEntry = (SvLBoxEntry*) GetModel()->GetEntryAtAbsPos( nPos++ ); + } +} + +void SfxConfigGroupListBox_Impl::SetStylesInfo(SfxStylesInfo_Impl* pStyles) +{ + pStylesInfo = pStyles; +} + +String SfxConfigGroupListBox_Impl::GetGroup() +/* Beschreibung + Gibt den Namen der selektierten Funktionsgruppe bzw. des selektierten + Basics zur"uck. +*/ +{ + SvLBoxEntry *pEntry = FirstSelected(); + while ( pEntry ) + { + SfxGroupInfo_Impl *pInfo = (SfxGroupInfo_Impl*) pEntry->GetUserData(); + if ( pInfo->nKind == SFX_CFGGROUP_FUNCTION ) + return GetEntryText( pEntry ); + + if ( pInfo->nKind == SFX_CFGGROUP_BASICMGR ) + { + BasicManager *pMgr = (BasicManager*) pInfo->pObject; + return pMgr->GetName(); + } + + if ( pInfo->nKind == SFX_CFGGROUP_DOCBASICMGR ) + { + Reference< XModel > xDoc( static_cast< XModel* >( pInfo->pObject ) ); + return ::comphelper::DocumentInfo::getDocumentTitle( xDoc ); + } + + pEntry = GetParent( pEntry ); + } + + return String(); +} + +//----------------------------------------------- +BasicManager* SfxConfigGroupListBox_Impl::GetBasicManager( const SvLBoxEntry& _rEntry ) +{ + BasicManager* pBasMgr = NULL; + + SfxGroupInfo_Impl* pInfo = (SfxGroupInfo_Impl*) _rEntry.GetUserData(); + switch ( pInfo->nKind ) + { + case SFX_CFGGROUP_BASICMGR : + pBasMgr = (BasicManager*) pInfo->pObject; + break; + case SFX_CFGGROUP_DOCBASICMGR : + { + Reference< XModel > xDoc( static_cast< XModel* >( pInfo->pObject ) ); + pBasMgr = ::basic::BasicManagerRepository::getDocumentBasicManager( xDoc ); + } + break; + } + return pBasMgr; +} + +//----------------------------------------------- +void SfxConfigGroupListBox_Impl::InitModule() +{ + try + { + css::uno::Reference< css::frame::XDispatchInformationProvider > xProvider(m_xFrame, css::uno::UNO_QUERY_THROW); + css::uno::Sequence< sal_Int16 > lGroups = xProvider->getSupportedCommandGroups(); + sal_Int32 c1 = lGroups.getLength(); + sal_Int32 i1 = 0; + + for (i1=0; i1<c1; ++i1) + { + sal_Int16& rGroupID = lGroups[i1]; + ::rtl::OUString sGroupID = ::rtl::OUString::valueOf((sal_Int32)rGroupID); + ::rtl::OUString sGroupName ; + + try + { + m_xModuleCategoryInfo->getByName(sGroupID) >>= sGroupName; + if (!sGroupName.getLength()) + continue; + } + catch(const css::container::NoSuchElementException&) + { continue; } + + SvLBoxEntry* pEntry = InsertEntry(sGroupName, NULL); + SfxGroupInfo_Impl* pInfo = new SfxGroupInfo_Impl(SFX_CFGGROUP_FUNCTION, rGroupID); + pEntry->SetUserData(pInfo); + } + } + catch(const css::uno::RuntimeException& exRun) + { throw exRun; } + catch(const css::uno::Exception&) + {} +} + +//----------------------------------------------- +void SfxConfigGroupListBox_Impl::InitBasic() +{ +} + +//----------------------------------------------- +void SfxConfigGroupListBox_Impl::InitStyles() +{ +} + +//----------------------------------------------- +namespace +{ + //........................................... + /** examines a component whether it supports XEmbeddedScripts, or provides access to such a + component by implementing XScriptInvocationContext. + @return + the model which supports the embedded scripts, or <NULL/> if it cannot find such a + model + */ + static Reference< XModel > lcl_getDocumentWithScripts_throw( const Reference< XInterface >& _rxComponent ) + { + Reference< XEmbeddedScripts > xScripts( _rxComponent, UNO_QUERY ); + if ( !xScripts.is() ) + { + Reference< XScriptInvocationContext > xContext( _rxComponent, UNO_QUERY ); + if ( xContext.is() ) + xScripts.set( xContext->getScriptContainer(), UNO_QUERY ); + } + + return Reference< XModel >( xScripts, UNO_QUERY ); + } + + //........................................... + static Reference< XModel > lcl_getScriptableDocument_nothrow( const Reference< XFrame >& _rxFrame ) + { + Reference< XModel > xDocument; + + // examine our associated frame + try + { + OSL_ENSURE( _rxFrame.is(), "lcl_getScriptableDocument_nothrow: you need to pass a frame to this dialog/tab page!" ); + if ( _rxFrame.is() ) + { + // first try the model in the frame + Reference< XController > xController( _rxFrame->getController(), UNO_SET_THROW ); + xDocument = lcl_getDocumentWithScripts_throw( xController->getModel() ); + + if ( !xDocument.is() ) + { + // if there is no suitable document in the frame, try the controller + xDocument = lcl_getDocumentWithScripts_throw( _rxFrame->getController() ); + } + } + } + catch( const Exception& ) + { + //DBG_UNHANDLED_EXCEPTION(); + } + + return xDocument; + } +} + +//----------------------------------------------- +void SfxConfigGroupListBox_Impl::Init(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR , + const css::uno::Reference< css::frame::XFrame >& xFrame , + const ::rtl::OUString& sModuleLongName) +{ + SetUpdateMode(FALSE); + ClearAll(); // Remove all old entries from treelist box + + m_xFrame = xFrame; + if ( xSMGR.is()) + { + m_xSMGR = xSMGR; + m_sModuleLongName = sModuleLongName; + + m_xGlobalCategoryInfo = css::uno::Reference< css::container::XNameAccess >(m_xSMGR->createInstance(SERVICE_UICATEGORYDESCRIPTION), css::uno::UNO_QUERY_THROW); + m_xModuleCategoryInfo = css::uno::Reference< css::container::XNameAccess >(m_xGlobalCategoryInfo->getByName(m_sModuleLongName) , css::uno::UNO_QUERY_THROW); + m_xUICmdDescription = css::uno::Reference< css::container::XNameAccess >(m_xSMGR->createInstance(SERVICE_UICMDDESCRIPTION) , css::uno::UNO_QUERY_THROW); + + InitModule(); + InitBasic(); + InitStyles(); + } + + /* + + // Verwendet wird der aktuelle Slotpool + if ( nMode ) + { + pSlotPool = pPool ? pPool : &SFX_SLOTPOOL(); + for ( USHORT i=1; i<pSlotPool->GetGroupCount(); i++ ) + { + // Gruppe anw"ahlen ( Gruppe 0 ist intern ) + String aName = pSlotPool->SeekGroup( i ); + const SfxSlot *pSfxSlot = pSlotPool->FirstSlot(); + if ( pSfxSlot ) + { + // Check if all entries are not useable. Don't + // insert a group without any useable function. + sal_Bool bActiveEntries = sal_False; + while ( pSfxSlot ) + { + USHORT nId = pSfxSlot->GetSlotId(); + if ( pSfxSlot->GetMode() & nMode ) + { + bActiveEntries = sal_True; + break; + } + + pSfxSlot = pSlotPool->NextSlot(); + } + + if ( bActiveEntries ) + { + // Wenn Gruppe nicht leer + SvLBoxEntry *pEntry = InsertEntry( aName, NULL ); + SfxGroupInfo_Impl *pInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_FUNCTION, i ); + aArr.Insert( pInfo, aArr.Count() ); + pEntry->SetUserData( pInfo ); + } + } + } + } +*/ + SfxApplication *pSfxApp = SFX_APP(); + if ( bShowBasic ) + { + // Basics einsammeln + pSfxApp->EnterBasicCall(); + String aMacroName(' '); + aMacroName += pImp->m_sDlgMacros; + + // Zuerst AppBasic + BasicManager *pAppBasicMgr = pSfxApp->GetBasicManager(); + BOOL bInsert = TRUE; + /* + if ( pArr ) + { + bInsert = FALSE; + for ( USHORT n=0; n<pArr->Count(); n++ ) + { + if ( *(*pArr)[n] == pSfxApp->GetName() ) + { + bInsert = TRUE; + break; + } + } + } + */ + + if ( bInsert ) + { + pAppBasicMgr->SetName( pSfxApp->GetName() ); + if ( pAppBasicMgr->GetLibCount() ) + { + // Nur einf"ugen, wenn Bibliotheken vorhanden + String aAppBasTitle( pImp->m_aHumanAppName ); + aAppBasTitle += aMacroName; + SvLBoxEntry *pEntry = InsertEntry( aAppBasTitle, 0 ); + SfxGroupInfo_Impl *pInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_BASICMGR, 0, pAppBasicMgr ); + // aArr.Insert( pInfo, aArr.Count() ); + pEntry->SetUserData( pInfo ); + pEntry->EnableChildsOnDemand( TRUE ); + // Expand( pEntry ); + } + } + + Reference< XModel > xDoc( lcl_getScriptableDocument_nothrow( m_xFrame ) ); + if ( xDoc.is() ) + { + BasicManager* pBasicMgr = ::basic::BasicManagerRepository::getDocumentBasicManager( xDoc ); + if ( pBasicMgr != pAppBasicMgr && pBasicMgr->GetLibCount() ) + { + String sDocTitle( ::comphelper::DocumentInfo::getDocumentTitle( xDoc ) ); + pBasicMgr->SetName( sDocTitle ); + + // Nur einf"ugen, wenn eigenes Basic mit Bibliotheken + SvLBoxEntry *pEntry = InsertEntry( sDocTitle.Append( aMacroName ), NULL ); + xDoc->acquire(); + SfxGroupInfo_Impl *pInfo = + new SfxGroupInfo_Impl( SFX_CFGGROUP_DOCBASICMGR, 0, xDoc.get() ); + pEntry->SetUserData( pInfo ); + pEntry->EnableChildsOnDemand( TRUE ); + } + } + + pSfxApp->LeaveBasicCall(); + } + + OSL_TRACE("** ** About to initialise SF Scripts"); + if ( bShowSF ) + { + OSL_TRACE("** ** bShowSF"); + // Add Scripting Framework entries + Reference< browse::XBrowseNode > rootNode; + Reference< XComponentContext > xCtx; + try + { + Reference < beans::XPropertySet > xProps( + ::comphelper::getProcessServiceFactory(), UNO_QUERY_THROW ); + xCtx.set( xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))), UNO_QUERY_THROW ); + Reference< browse::XBrowseNodeFactory > xFac( xCtx->getValueByName( + ::rtl::OUString::createFromAscii( "/singletons/com.sun.star.script.browse.theBrowseNodeFactory") ), UNO_QUERY_THROW ); + rootNode.set( xFac->createView( browse::BrowseNodeFactoryViewTypes::MACROSELECTOR ) ); + //rootNode.set( xFac->createView( browse::BrowseNodeFactoryViewTypes::MACROORGANIZER ) ); + } + catch( Exception& e ) + { + OSL_TRACE(" Caught some exception whilst retrieving browse nodes from factory... Exception: %s", + ::rtl::OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).pData->buffer ); + // TODO exception handling + } + + + if ( rootNode.is() ) + { + if ( nMode ) + { + //We call acquire on the XBrowseNode so that it does not + //get autodestructed and become invalid when accessed later. + rootNode->acquire(); + + SfxGroupInfo_Impl *pInfo = + new SfxGroupInfo_Impl( SFX_CFGGROUP_SCRIPTCONTAINER, 0, + static_cast<void *>(rootNode.get())); + + String aTitle(pImp->m_sDlgMacros); + SvLBoxEntry *pNewEntry = InsertEntry( aTitle, NULL ); + pNewEntry->SetUserData( pInfo ); + pNewEntry->EnableChildsOnDemand( TRUE ); + aArr.Insert( pInfo, aArr.Count() ); + } + else + { + //We are only showing scripts not slot APIs so skip + //Root node and show location nodes + try { + if ( rootNode->hasChildNodes() ) + { + Sequence< Reference< browse::XBrowseNode > > children = + rootNode->getChildNodes(); + BOOL bIsRootNode = FALSE; + + ::rtl::OUString user = ::rtl::OUString::createFromAscii("user"); + ::rtl::OUString share = ::rtl::OUString::createFromAscii("share"); + if ( rootNode->getName().equals(::rtl::OUString::createFromAscii("Root") )) + { + bIsRootNode = TRUE; + } + + //To mimic current starbasic behaviour we + //need to make sure that only the current document + //is displayed in the config tree. Tests below + //set the bDisplay flag to FALSE if the current + //node is a first level child of the Root and is NOT + //either the current document, user or share + ::rtl::OUString currentDocTitle; + Reference< XModel > xDocument( lcl_getScriptableDocument_nothrow( m_xFrame ) ); + if ( xDocument.is() ) + { + currentDocTitle = ::comphelper::DocumentInfo::getDocumentTitle( xDocument ); + } + + for ( sal_Int32 n = 0; n < children.getLength(); n++ ) + { + Reference< browse::XBrowseNode >& theChild = children[n]; + BOOL bDisplay = TRUE; + ::rtl::OUString uiName = theChild->getName(); + if ( bIsRootNode ) + { + if ( ! ((theChild->getName().equals( user ) || theChild->getName().equals( share ) || + theChild->getName().equals( currentDocTitle ) ) ) ) + { + bDisplay=FALSE; + } + else + { + if ( uiName.equals( user ) ) + { + uiName = pImp->m_sMyMacros; + } + else if ( uiName.equals( share ) ) + { + uiName = pImp->m_sProdMacros; + } + } + } + if (children[n]->getType() != browse::BrowseNodeTypes::SCRIPT && bDisplay ) + { + +// We call acquire on the XBrowseNode so that it does not +// get autodestructed and become invalid when accessed later. + theChild->acquire(); + + SfxGroupInfo_Impl* pInfo = + new SfxGroupInfo_Impl(SFX_CFGGROUP_SCRIPTCONTAINER, + 0, static_cast<void *>( theChild.get())); + + Image aImage = GetImage( theChild, xCtx, bIsRootNode,BMP_COLOR_NORMAL ); + SvLBoxEntry* pNewEntry = + InsertEntry( uiName, NULL); + SetExpandedEntryBmp(pNewEntry, aImage, BMP_COLOR_NORMAL); + SetCollapsedEntryBmp(pNewEntry, aImage, BMP_COLOR_NORMAL); + aImage = GetImage( theChild, xCtx, bIsRootNode,BMP_COLOR_HIGHCONTRAST ); + SetExpandedEntryBmp(pNewEntry, aImage, BMP_COLOR_HIGHCONTRAST); + SetCollapsedEntryBmp(pNewEntry, aImage, BMP_COLOR_HIGHCONTRAST); + + pNewEntry->SetUserData( pInfo ); + aArr.Insert( pInfo, aArr.Count() ); + + if ( children[n]->hasChildNodes() ) + { + Sequence< Reference< browse::XBrowseNode > > grandchildren = + children[n]->getChildNodes(); + + for ( sal_Int32 m = 0; m < grandchildren.getLength(); m++ ) + { + if ( grandchildren[m]->getType() == browse::BrowseNodeTypes::CONTAINER ) + { + pNewEntry->EnableChildsOnDemand( TRUE ); + m = grandchildren.getLength(); + } + } + } + } + } + } + } + catch (RuntimeException&) { + // do nothing, the entry will not be displayed in the UI + } + } + } + } + + // add styles + if ( m_xSMGR.is() ) + { + String sStyle( pImp->m_aStrGroupStyles ); + SvLBoxEntry *pEntry = InsertEntry( sStyle, 0 ); + SfxGroupInfo_Impl *pInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_STYLES, 0, 0 ); // TODO last parameter should contain user data + aArr.Insert( pInfo, aArr.Count() ); + pEntry->SetUserData( pInfo ); + pEntry->EnableChildsOnDemand( TRUE ); + } + +/* { + String sSymbols( String::CreateFromAscii("Symbols") ); + SvLBoxEntry *pEntry = InsertEntry( sSymbols, 0 ); + SfxGroupInfo_Impl *pInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_SPECIALCHARACTERS, 0, 0 ); // TODO last parameter should contain user data + aArr.Insert( pInfo, aArr.Count() ); + pEntry->SetUserData( pInfo ); + } */ + + MakeVisible( GetEntry( 0,0 ) ); + SetUpdateMode( TRUE ); +} +Image SfxConfigGroupListBox_Impl::GetImage( Reference< browse::XBrowseNode > node, Reference< XComponentContext > xCtx, bool bIsRootNode, bool bHighContrast ) +{ + Image aImage; + if ( bIsRootNode ) + { + ::rtl::OUString user = ::rtl::OUString::createFromAscii("user"); + ::rtl::OUString share = ::rtl::OUString::createFromAscii("share"); + if (node->getName().equals( user ) || node->getName().equals(share ) ) + { + if( bHighContrast == BMP_COLOR_NORMAL ) + aImage = pImp->m_hdImage; + else + aImage = pImp->m_hdImage_hc; + } + else + { + ::rtl::OUString factoryURL; + ::rtl::OUString nodeName = node->getName(); + Reference<XInterface> xDocumentModel = getDocumentModel(xCtx, nodeName ); + if ( xDocumentModel.is() ) + { + Reference< ::com::sun::star::frame::XModuleManager > + xModuleManager( + xCtx->getServiceManager() + ->createInstanceWithContext( + ::rtl::OUString::createFromAscii("" // xxx todo + "com.sun.star.frame.ModuleManager"), + xCtx ), + UNO_QUERY_THROW ); + Reference<container::XNameAccess> xModuleConfig( + xModuleManager, UNO_QUERY_THROW ); + // get the long name of the document: + ::rtl::OUString appModule( xModuleManager->identify( + xDocumentModel ) ); + Sequence<beans::PropertyValue> moduleDescr; + Any aAny = xModuleConfig->getByName(appModule); + if( sal_True != ( aAny >>= moduleDescr ) ) + { + throw RuntimeException(::rtl::OUString::createFromAscii("SFTreeListBox::Init: failed to get PropertyValue"), Reference< XInterface >()); + } + beans::PropertyValue const * pmoduleDescr = + moduleDescr.getConstArray(); + for ( sal_Int32 pos = moduleDescr.getLength(); pos--; ) + { + if (pmoduleDescr[ pos ].Name.equalsAsciiL( + RTL_CONSTASCII_STRINGPARAM( + "ooSetupFactoryEmptyDocumentURL") )) + { + pmoduleDescr[ pos ].Value >>= factoryURL; + OSL_TRACE("factory url for doc images is %s", + ::rtl::OUStringToOString( factoryURL , RTL_TEXTENCODING_ASCII_US ).pData->buffer ); + break; + } + } + } + if( factoryURL.getLength() > 0 ) + { + if( bHighContrast == BMP_COLOR_NORMAL ) + aImage = SvFileInformationManager::GetFileImage( + INetURLObject(factoryURL), false, + BMP_COLOR_NORMAL ); + else + aImage = SvFileInformationManager::GetFileImage( + INetURLObject(factoryURL), false, + BMP_COLOR_HIGHCONTRAST ); + } + else + { + if( bHighContrast == BMP_COLOR_NORMAL ) + aImage = pImp->m_docImage; + else + aImage = pImp->m_docImage_hc; + } + } + } + else + { + if( node->getType() == browse::BrowseNodeTypes::SCRIPT ) + { + if( bHighContrast == BMP_COLOR_NORMAL ) + aImage = pImp->m_macImage; + else + aImage = pImp->m_macImage_hc; + } + else + { + if( bHighContrast == BMP_COLOR_NORMAL ) + aImage = pImp->m_libImage; + else + aImage = pImp->m_libImage_hc; + } + } + return aImage; +} + +Reference< XInterface > +SfxConfigGroupListBox_Impl::getDocumentModel( Reference< XComponentContext >& xCtx, ::rtl::OUString& docName ) +{ + Reference< XInterface > xModel; + Reference< lang::XMultiComponentFactory > mcf = + xCtx->getServiceManager(); + Reference< frame::XDesktop > desktop ( + mcf->createInstanceWithContext( + ::rtl::OUString::createFromAscii("com.sun.star.frame.Desktop"), xCtx ), + UNO_QUERY ); + + Reference< container::XEnumerationAccess > componentsAccess = + desktop->getComponents(); + Reference< container::XEnumeration > components = + componentsAccess->createEnumeration(); + while (components->hasMoreElements()) + { + Reference< frame::XModel > model( + components->nextElement(), UNO_QUERY ); + if ( model.is() ) + { + ::rtl::OUString sTdocUrl = + ::comphelper::DocumentInfo::getDocumentTitle( model ); + if( sTdocUrl.equals( docName ) ) + { + xModel = model; + break; + } + } + } + return xModel; +} + +::rtl::OUString SfxConfigGroupListBox_Impl::parseLocationName( const ::rtl::OUString& location ) +{ + // strip out the last leaf of location name + // e.g. file://dir1/dir2/Blah.sxw - > Blah.sxw + ::rtl::OUString temp = location; + sal_Int32 lastSlashIndex = temp.lastIndexOf( ::rtl::OUString::createFromAscii( "/" ) ); + + if ( ( lastSlashIndex + 1 ) < temp.getLength() ) + { + temp = temp.copy( lastSlashIndex + 1 ); + } + // maybe we should throw here!!! + else + { + OSL_TRACE("Something wrong with name, perhaps we should throw an exception"); + } + return temp; +} + +//----------------------------------------------- +::rtl::OUString SfxConfigGroupListBox_Impl::MapCommand2UIName(const ::rtl::OUString& sCommand) +{ + ::rtl::OUString sUIName; + try + { + css::uno::Reference< css::container::XNameAccess > xModuleConf; + m_xUICmdDescription->getByName(m_sModuleLongName) >>= xModuleConf; + if (xModuleConf.is()) + { + ::comphelper::SequenceAsHashMap lProps(xModuleConf->getByName(sCommand)); + sUIName = lProps.getUnpackedValueOrDefault(::rtl::OUString::createFromAscii("Name"), ::rtl::OUString()); + } + } + catch(const css::uno::RuntimeException& exRun) + { throw exRun; } + catch(css::uno::Exception&) + { sUIName = ::rtl::OUString(); } + + // fallback for missing UINames !? + if (!sUIName.getLength()) + { + sUIName = sCommand; + /* + #if OSL_DEBUG_LEVEL > 1 + ::rtl::OUStringBuffer sMsg(256); + sMsg.appendAscii("There is no UIName for the internal command \""); + sMsg.append (sCommand ); + sMsg.appendAscii("\". The UI will be invalid then ..." ); + OSL_ENSURE(sal_False, ::rtl::OUStringToOString(sMsg.makeStringAndClear(), RTL_TEXTENCODING_UTF8).getStr()); + #endif + */ + } + + return sUIName; +} + +//----------------------------------------------- +void SfxConfigGroupListBox_Impl::GroupSelected() +/* Beschreibung + Eine Funktionsgruppe oder eine Basicmodul wurde selektiert. Alle Funktionen bzw. + Macros werden in der Functionlistbox anzeigt. +*/ +{ + SvLBoxEntry *pEntry = FirstSelected(); + SfxGroupInfo_Impl *pInfo = (SfxGroupInfo_Impl*) pEntry->GetUserData(); + pFunctionListBox->SetUpdateMode(FALSE); + pFunctionListBox->ClearAll(); + if ( pInfo->nKind != SFX_CFGGROUP_FUNCTION && + pInfo->nKind != SFX_CFGGROUP_BASICMOD && + pInfo->nKind != SFX_CFGGROUP_SCRIPTCONTAINER && + pInfo->nKind != SFX_CFGGROUP_STYLES ) + { + pFunctionListBox->SetUpdateMode(TRUE); + return; + } + + switch ( pInfo->nKind ) + { + case SFX_CFGGROUP_FUNCTION : + { + USHORT nGroup = pInfo->nOrd; + css::uno::Reference< css::frame::XDispatchInformationProvider > xProvider (m_xFrame, css::uno::UNO_QUERY_THROW); + css::uno::Sequence< css::frame::DispatchInformation > lCommands = xProvider->getConfigurableDispatchInformation(nGroup); + sal_Int32 c = lCommands.getLength(); + sal_Int32 i = 0; + + for (i=0; i<c; ++i) + { + const css::frame::DispatchInformation& rInfo = lCommands[i]; + ::rtl::OUString sUIName = MapCommand2UIName(rInfo.Command); + SvLBoxEntry* pFuncEntry = pFunctionListBox->InsertEntry(sUIName, NULL); + SfxGroupInfo_Impl* pGrpInfo = new SfxGroupInfo_Impl(SFX_CFGFUNCTION_SLOT, 0); + pGrpInfo->sCommand = rInfo.Command; + pGrpInfo->sLabel = sUIName; + pFuncEntry->SetUserData(pGrpInfo); + } + + break; + } + + case SFX_CFGGROUP_BASICMOD : + { + SvLBoxEntry *pLibEntry = GetParent( pEntry ); + SfxGroupInfo_Impl *pLibInfo = + (SfxGroupInfo_Impl*) pLibEntry->GetUserData(); + SvLBoxEntry *pBasEntry = GetParent( pLibEntry ); + SfxGroupInfo_Impl *pBasInfo = + (SfxGroupInfo_Impl*) pBasEntry->GetUserData(); + + StarBASIC *pLib = (StarBASIC*) pLibInfo->pObject; + Reference< XModel > xDoc; + if ( pBasInfo->nKind == SFX_CFGGROUP_DOCBASICMGR ) + xDoc = static_cast< XModel* >( pBasInfo->pObject ); + + SbModule *pMod = (SbModule*) pInfo->pObject; + for ( USHORT nMeth=0; nMeth < pMod->GetMethods()->Count(); nMeth++ ) + { + SbxMethod *pMeth = (SbxMethod*)pMod->GetMethods()->Get(nMeth); + SfxMacroInfoPtr pInf = new SfxMacroInfo( !xDoc.is(), + pLib->GetName(), + pMod->GetName(), + pMeth->GetName()); + if ( pMeth->GetInfo() ) + pInf->SetHelpText( pMeth->GetInfo()->GetComment() ); + USHORT nId = SFX_APP()->GetMacroConfig()->GetSlotId( pInf ); + if ( !nId ) + break; // Kein Slot mehr frei + + SvLBoxEntry* pFuncEntry = + pFunctionListBox->InsertEntry( pMeth->GetName(), NULL ); + SfxGroupInfo_Impl *pGrpInfo = + new SfxGroupInfo_Impl( SFX_CFGFUNCTION_MACRO, nId, pInf ); + pFunctionListBox->aArr.Insert( pGrpInfo, pFunctionListBox->aArr.Count() ); + pFuncEntry->SetUserData( pGrpInfo ); + } + + break; + } + + case SFX_CFGGROUP_SCRIPTCONTAINER: + { + if ( !GetChildCount( pEntry ) ) + { + Reference< browse::XBrowseNode > rootNode( + reinterpret_cast< browse::XBrowseNode* >( pInfo->pObject ) ) ; + + try { + if ( rootNode->hasChildNodes() ) + { + Sequence< Reference< browse::XBrowseNode > > children = + rootNode->getChildNodes(); + + for ( sal_Int32 n = 0; n < children.getLength(); n++ ) + { + if (children[n]->getType() == browse::BrowseNodeTypes::SCRIPT) + { + ::rtl::OUString uri; + + Reference < beans::XPropertySet >xPropSet( children[n], UNO_QUERY ); + if (!xPropSet.is()) + { + continue; + } + + Any value = + xPropSet->getPropertyValue( String::CreateFromAscii( "URI" ) ); + value >>= uri; + + SfxMacroInfo* aInfo = new SfxMacroInfo( (String)uri ); + aInfo->SetHelpText( uri ); + SFX_APP()->GetMacroConfig()->GetSlotId( aInfo ); + + SfxGroupInfo_Impl* pGrpInfo = + new SfxGroupInfo_Impl(SFX_CFGFUNCTION_SCRIPT, + aInfo->GetSlotId(), aInfo); + + Image aImage = GetImage( children[n], Reference< XComponentContext >(), sal_False, BMP_COLOR_NORMAL ); + SvLBoxEntry* pNewEntry = + pFunctionListBox->InsertEntry( children[n]->getName(), NULL ); + pFunctionListBox->SetExpandedEntryBmp(pNewEntry, aImage, BMP_COLOR_NORMAL); + pFunctionListBox->SetCollapsedEntryBmp(pNewEntry, aImage, BMP_COLOR_NORMAL); + aImage = GetImage( children[n], Reference< XComponentContext >(), sal_False, BMP_COLOR_HIGHCONTRAST ); + pFunctionListBox->SetExpandedEntryBmp(pNewEntry, aImage, BMP_COLOR_HIGHCONTRAST); + pFunctionListBox->SetCollapsedEntryBmp(pNewEntry, aImage, BMP_COLOR_HIGHCONTRAST); + + pGrpInfo->sCommand = uri; + pGrpInfo->sLabel = children[n]->getName(); + pNewEntry->SetUserData( pGrpInfo ); + + pFunctionListBox->aArr.Insert( + pGrpInfo, pFunctionListBox->aArr.Count() ); + + } + } + } + } + catch (RuntimeException&) { + // do nothing, the entry will not be displayed in the UI + } + } + break; + } + + case SFX_CFGGROUP_STYLES : + { + SfxStyleInfo_Impl* pFamily = (SfxStyleInfo_Impl*)(pInfo->pObject); + if (pFamily) + { + const ::std::vector< SfxStyleInfo_Impl > lStyles = pStylesInfo->getStyles(pFamily->sFamily); + ::std::vector< SfxStyleInfo_Impl >::const_iterator pIt; + for ( pIt = lStyles.begin(); + pIt != lStyles.end() ; + ++pIt ) + { + SfxStyleInfo_Impl* pStyle = new SfxStyleInfo_Impl(*pIt); + SvLBoxEntry* pFuncEntry = pFunctionListBox->InsertEntry( pStyle->sLabel, NULL ); + SfxGroupInfo_Impl *pGrpInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_STYLES, 0, pStyle ); + pFunctionListBox->aArr.Insert( pGrpInfo, pFunctionListBox->aArr.Count() ); + pGrpInfo->sCommand = pStyle->sCommand; + pGrpInfo->sLabel = pStyle->sLabel; + pFuncEntry->SetUserData( pGrpInfo ); + } + } + break; + } + + default: + return; + } + + if ( pFunctionListBox->GetEntryCount() ) + pFunctionListBox->Select( pFunctionListBox->GetEntry( 0, 0 ) ); + + pFunctionListBox->SetUpdateMode(TRUE); +} + +BOOL SfxConfigGroupListBox_Impl::Expand( SvLBoxEntry* pParent ) +{ + BOOL bRet = SvTreeListBox::Expand( pParent ); + if ( bRet ) + { + // Wieviele Entries k"onnen angezeigt werden ? + ULONG nEntries = GetOutputSizePixel().Height() / GetEntryHeight(); + + // Wieviele Kinder sollen angezeigt werden ? + ULONG nChildCount = GetVisibleChildCount( pParent ); + + // Passen alle Kinder und der parent gleichzeitig in die View ? + if ( nChildCount+1 > nEntries ) + { + // Wenn nicht, wenigstens parent ganz nach oben schieben + MakeVisible( pParent, TRUE ); + } + else + { + // An welcher relativen ViewPosition steht der aufzuklappende parent + SvLBoxEntry *pEntry = GetFirstEntryInView(); + ULONG nParentPos = 0; + while ( pEntry && pEntry != pParent ) + { + nParentPos++; + pEntry = GetNextEntryInView( pEntry ); + } + + // Ist unter dem parent noch genug Platz f"ur alle Kinder ? + if ( nParentPos + nChildCount + 1 > nEntries ) + ScrollOutputArea( (short)( nEntries - ( nParentPos + nChildCount + 1 ) ) ); + } + } + + return bRet; +} + +void SfxConfigGroupListBox_Impl::RequestingChilds( SvLBoxEntry *pEntry ) +/* Beschreibung + Ein Basic oder eine Bibliothek werden ge"offnet +*/ +{ + SfxGroupInfo_Impl *pInfo = (SfxGroupInfo_Impl*) pEntry->GetUserData(); + pInfo->bWasOpened = TRUE; + switch ( pInfo->nKind ) + { + case SFX_CFGGROUP_BASICMGR : + case SFX_CFGGROUP_DOCBASICMGR : + { + if ( !GetChildCount( pEntry ) ) + { + // Erstmaliges "Offnen + BasicManager* pMgr( GetBasicManager( *pEntry ) ); + + SvLBoxEntry *pLibEntry = 0; + for ( USHORT nLib=0; nLib<pMgr->GetLibCount(); nLib++) + { + StarBASIC* pLib = pMgr->GetLib( nLib ); + pLibEntry = InsertEntry( pMgr->GetLibName( nLib ), pEntry ); + SfxGroupInfo_Impl *pGrpInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_BASICLIB, nLib, pLib ); + aArr.Insert( pGrpInfo, aArr.Count() ); + pLibEntry->SetUserData( pGrpInfo ); + pLibEntry->EnableChildsOnDemand( TRUE ); + } + } + + break; + } + + case SFX_CFGGROUP_BASICLIB : + { + if ( !GetChildCount( pEntry ) ) + { + // Erstmaliges "Offnen + StarBASIC *pLib = (StarBASIC*) pInfo->pObject; + if ( !pLib ) + { + // Lib mu\s nachgeladen werden + SvLBoxEntry *pParent = GetParent( pEntry ); + BasicManager *pMgr( GetBasicManager( *pParent ) ); + + if ( pMgr->LoadLib( pInfo->nOrd ) ) + pInfo->pObject = pLib = pMgr->GetLib( pInfo->nOrd ); + else + break; + } + + SvLBoxEntry *pModEntry = 0; + for ( USHORT nMod=0; nMod<pLib->GetModules()->Count(); nMod++ ) + { + SbModule* pMod = (SbModule*)pLib->GetModules()->Get( nMod ); + + BOOL bIsStarScript = FALSE; //pMod->ISA( SbJScriptModule ); + BOOL bWantsStarScript = pImp->m_aScriptType.EqualsAscii("StarScript"); + if ( bIsStarScript != bWantsStarScript ) + continue; + pModEntry = InsertEntry( pMod->GetName(), pEntry ); + SfxGroupInfo_Impl *pGrpInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_BASICMOD, 0, pMod ); + aArr.Insert( pGrpInfo, aArr.Count() ); + pModEntry->SetUserData( pGrpInfo ); + } + } + + break; + } + + case SFX_CFGGROUP_SCRIPTCONTAINER: + { + if ( !GetChildCount( pEntry ) ) + { + Reference< browse::XBrowseNode > rootNode( + reinterpret_cast< browse::XBrowseNode* >( pInfo->pObject ) ) ; + + try { + if ( rootNode->hasChildNodes() ) + { + Sequence< Reference< browse::XBrowseNode > > children = + rootNode->getChildNodes(); + BOOL bIsRootNode = FALSE; + + ::rtl::OUString user = ::rtl::OUString::createFromAscii("user"); + ::rtl::OUString share = ::rtl::OUString::createFromAscii("share"); + if ( rootNode->getName().equals(::rtl::OUString::createFromAscii("Root") )) + { + bIsRootNode = TRUE; + } + + /* To mimic current starbasic behaviour we + need to make sure that only the current document + is displayed in the config tree. Tests below + set the bDisplay flag to FALSE if the current + node is a first level child of the Root and is NOT + either the current document, user or share */ + ::rtl::OUString currentDocTitle; + Reference< XModel > xDocument( lcl_getScriptableDocument_nothrow( m_xFrame ) ); + if ( xDocument.is() ) + { + currentDocTitle = ::comphelper::DocumentInfo::getDocumentTitle( xDocument ); + } + + sal_Int32 nLen = children.getLength(); + for ( sal_Int32 n = 0; n < nLen; n++ ) + { + Reference< browse::XBrowseNode >& theChild = children[n]; + ::rtl::OUString aName( theChild->getName() ); + BOOL bDisplay = TRUE; + if ( bIsRootNode ) + { + if ( !( (aName.equals(user) || aName.equals(share) || aName.equals(currentDocTitle) ) ) ) + bDisplay=FALSE; + } + if ( children[n].is() && children[n]->getType() != browse::BrowseNodeTypes::SCRIPT && bDisplay ) + { + + /* + We call acquire on the XBrowseNode so that it does not + get autodestructed and become invalid when accessed later. + */ + theChild->acquire(); + + SfxGroupInfo_Impl* pGrpInfo = + new SfxGroupInfo_Impl(SFX_CFGGROUP_SCRIPTCONTAINER, + 0, static_cast<void *>( theChild.get())); + + Image aImage = GetImage( theChild, Reference< XComponentContext >(), sal_False, BMP_COLOR_NORMAL ); + SvLBoxEntry* pNewEntry = + InsertEntry( theChild->getName(), pEntry ); + SetExpandedEntryBmp(pNewEntry, aImage, BMP_COLOR_NORMAL); + SetCollapsedEntryBmp(pNewEntry, aImage, BMP_COLOR_NORMAL); + aImage = GetImage( theChild, Reference< XComponentContext >(), sal_False, BMP_COLOR_HIGHCONTRAST ); + SetExpandedEntryBmp(pNewEntry, aImage, BMP_COLOR_HIGHCONTRAST); + SetCollapsedEntryBmp(pNewEntry, aImage, BMP_COLOR_HIGHCONTRAST); + + pNewEntry->SetUserData( pGrpInfo ); + aArr.Insert( pGrpInfo, aArr.Count() ); + + if ( children[n]->hasChildNodes() ) + { + Sequence< Reference< browse::XBrowseNode > > grandchildren = + children[n]->getChildNodes(); + + for ( sal_Int32 m = 0; m < grandchildren.getLength(); m++ ) + { + if ( grandchildren[m]->getType() == browse::BrowseNodeTypes::CONTAINER ) + { + pNewEntry->EnableChildsOnDemand( TRUE ); + m = grandchildren.getLength(); + } + } + } + } + } + } + } + catch (RuntimeException&) { + // do nothing, the entry will not be displayed in the UI + } + } + break; + } + + case SFX_CFGGROUP_STYLES: + { + if ( !GetChildCount( pEntry ) ) + { + const ::std::vector< SfxStyleInfo_Impl > lStyleFamilies = pStylesInfo->getStyleFamilies(); + ::std::vector< SfxStyleInfo_Impl >::const_iterator pIt; + for ( pIt = lStyleFamilies.begin(); + pIt != lStyleFamilies.end() ; + ++pIt ) + { + SfxStyleInfo_Impl* pFamily = new SfxStyleInfo_Impl(*pIt); + SvLBoxEntry* pStyleEntry = InsertEntry( pFamily->sLabel, pEntry ); + SfxGroupInfo_Impl *pGrpInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_STYLES, 0, pFamily ); + aArr.Insert( pGrpInfo, aArr.Count() ); + pStyleEntry->SetUserData( pGrpInfo ); + pStyleEntry->EnableChildsOnDemand( FALSE ); + } + } + break; + } + + default: + DBG_ERROR( "Falscher Gruppentyp!" ); + break; + } +} + +void SfxConfigGroupListBox_Impl::AddAndSelect( const SfxStringItem* , const SfxStringItem* ) +{ + /* + if ( pText ) + { + Select( GetEntry( GetEntryCount()-1) ); + SvLBoxEntry* pFuncEntry = pFunctionListBox->InsertEntry( pText->GetValue(), NULL ); + SfxGroupInfo_Impl *pGrpInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_SPECIALCHARACTERS, 0, 0 ); + String aCommand = String::CreateFromAscii(".uno:InsertSymbol?Symbols:string="); + aCommand += pText->GetValue(); + pFunctionListBox->aArr.Insert( pGrpInfo, pFunctionListBox->aArr.Count() ); + pGrpInfo->sCommand = aCommand; + pGrpInfo->sLabel = String::CreateFromAscii("Symbols: "); + pGrpInfo->sLabel += pText->GetValue(); + pFuncEntry->SetUserData( pGrpInfo ); + } + */ +} + +void SfxConfigGroupListBox_Impl::SelectMacro( const SfxMacroInfoItem *pItem ) +{ + SelectMacro( pItem->GetBasicManager()->GetName(), + pItem->GetQualifiedName() ); +} + +void SfxConfigGroupListBox_Impl::SelectMacro( const String& rBasic, + const String& rMacro ) +{ + String aBasicName( rBasic ); + aBasicName += ' '; + aBasicName += pImp->m_sMacros; + String aLib, aModule, aMethod; + USHORT nCount = rMacro.GetTokenCount('.'); + aMethod = rMacro.GetToken( nCount-1, '.' ); + if ( nCount > 2 ) + { + aLib = rMacro.GetToken( 0, '.' ); + aModule = rMacro.GetToken( nCount-2, '.' ); + } + + SvLBoxEntry *pEntry = FirstChild(0); + while ( pEntry ) + { + String aEntryBas = GetEntryText( pEntry ); + if ( aEntryBas == aBasicName ) + { + Expand( pEntry ); + SvLBoxEntry *pLib = FirstChild( pEntry ); + while ( pLib ) + { + String aEntryLib = GetEntryText( pLib ); + if ( aEntryLib == aLib ) + { + Expand( pLib ); + SvLBoxEntry *pMod = FirstChild( pLib ); + while ( pMod ) + { + String aEntryMod = GetEntryText( pMod ); + if ( aEntryMod == aModule ) + { + Expand( pMod ); + MakeVisible( pMod ); + Select( pMod ); + SvLBoxEntry *pMethod = pFunctionListBox->First(); + while ( pMethod ) + { + String aEntryMethod = GetEntryText( pMethod ); + if ( aEntryMethod == aMethod ) + { + pFunctionListBox->Select( pMethod ); + pFunctionListBox->MakeVisible( pMethod ); + return; + } + pMethod = pFunctionListBox->Next( pMethod ); + } + } + pMod = NextSibling( pMod ); + } + } + pLib = NextSibling( pLib ); + } + } + pEntry = NextSibling( pEntry ); + } +} diff --git a/svx/source/cui/cfgutil.hxx b/svx/source/cui/cfgutil.hxx new file mode 100644 index 000000000000..c19a47495290 --- /dev/null +++ b/svx/source/cui/cfgutil.hxx @@ -0,0 +1,220 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: cfg.hxx,v $ + * $Revision: 1.41 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _CFGUTIL_HXX +#define _CFGUTIL_HXX + +#include <vector> +#include <rtl/ustring.hxx> +#include <tools/string.hxx> + +#include <com/sun/star/frame/XModel.hpp> +#include <com/sun/star/frame/XFrame.hpp> +#include <com/sun/star/lang/XSingleComponentFactory.hpp> +#include <com/sun/star/container/XNameAccess.hpp> +#include <com/sun/star/script/browse/XBrowseNode.hpp> + +#define _SVSTDARR_STRINGSDTOR +#include <svtools/svstdarr.hxx> + +#include <vcl/timer.hxx> +#include <svtools/svtabbx.hxx> +#include <svtools/svtreebx.hxx> +#include <vcl/image.hxx> + +class BasicManager; +class SfxSlotPool; +class SfxStringItem; +class SfxFontItem; +class SfxMacroInfoItem; +class SfxMacroInfo; +struct SfxStyleInfo_Impl; +struct SfxStylesInfo_Impl; + +#define css ::com::sun::star + +struct SfxStyleInfo_Impl +{ + ::rtl::OUString sFamily; + ::rtl::OUString sStyle; + ::rtl::OUString sCommand; + ::rtl::OUString sLabel; + + SfxStyleInfo_Impl() + {} + + SfxStyleInfo_Impl(const SfxStyleInfo_Impl& rCopy) + { + sFamily = rCopy.sFamily; + sStyle = rCopy.sStyle; + sCommand = rCopy.sCommand; + sLabel = rCopy.sLabel; + } +}; + +struct SfxStylesInfo_Impl +{ + private: + + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > m_xDoc; + + public: + + SfxStylesInfo_Impl(); + void setModel(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel); + + sal_Bool parseStyleCommand(SfxStyleInfo_Impl& aStyle); + void getLabel4Style(SfxStyleInfo_Impl& aStyle); + + ::std::vector< SfxStyleInfo_Impl > getStyleFamilies(); + ::std::vector< SfxStyleInfo_Impl > getStyles(const ::rtl::OUString& sFamily); + + static ::rtl::OUString generateCommand(const ::rtl::OUString& sFamily, const ::rtl::OUString& sStyle); +}; + +#define SFX_CFGGROUP_FUNCTION 1 +#define SFX_CFGGROUP_BASICMGR 2 +#define SFX_CFGGROUP_DOCBASICMGR 3 +#define SFX_CFGGROUP_BASICLIB 4 +#define SFX_CFGGROUP_BASICMOD 5 +#define SFX_CFGFUNCTION_MACRO 6 +#define SFX_CFGFUNCTION_SLOT 7 +#define SFX_CFGGROUP_SCRIPTCONTAINER 8 +#define SFX_CFGFUNCTION_SCRIPT 9 +#define SFX_CFGGROUP_STYLES 10 +#define SFX_CFGGROUP_SPECIALCHARACTERS 11 + +struct SfxGroupInfo_Impl +{ + USHORT nKind; + USHORT nOrd; + void* pObject; + BOOL bWasOpened; + String sCommand; + String sLabel; + + SfxGroupInfo_Impl( USHORT n, USHORT nr, void* pObj = 0 ) : + nKind( n ), nOrd( nr ), pObject( pObj ), bWasOpened(FALSE) {} +}; + +typedef SfxGroupInfo_Impl* SfxGroupInfoPtr; +SV_DECL_PTRARR_DEL(SfxGroupInfoArr_Impl, SfxGroupInfoPtr, 5, 5) + +class SfxConfigFunctionListBox_Impl : public SvTreeListBox +{ + friend class SfxConfigGroupListBox_Impl; + Timer aTimer; + SvLBoxEntry* pCurEntry; + SfxGroupInfoArr_Impl aArr; + SfxStylesInfo_Impl* pStylesInfo; + + DECL_LINK( TimerHdl, Timer* ); + virtual void MouseMove( const MouseEvent& rMEvt ); + +public: + SfxConfigFunctionListBox_Impl( Window*, const ResId& ); + ~SfxConfigFunctionListBox_Impl(); + + void ClearAll(); + SvLBoxEntry* GetEntry_Impl( USHORT nId ); + SvLBoxEntry* GetEntry_Impl( const String& ); + USHORT GetId( SvLBoxEntry *pEntry ); + using Window::GetHelpText; + String GetHelpText( SvLBoxEntry *pEntry ); + USHORT GetCurId() { return GetId( FirstSelected() ); } + String GetCurCommand(); + String GetCurLabel(); + SfxMacroInfo* GetMacroInfo(); + void FunctionSelected(); + void SetStylesInfo(SfxStylesInfo_Impl* pStyles); +}; + +struct SvxConfigGroupBoxResource_Impl; +class SfxConfigGroupListBox_Impl : public SvTreeListBox +{ + SvxConfigGroupBoxResource_Impl* pImp; + //SfxSlotPool* pSlotPool; + SfxConfigFunctionListBox_Impl* pFunctionListBox; + SfxGroupInfoArr_Impl aArr; + ULONG nMode; + BOOL bShowSF; // show Scripting Framework scripts + BOOL bShowBasic; // show Basic scripts + + ::rtl::OUString m_sModuleLongName; + css::uno::Reference< css::lang::XMultiServiceFactory > m_xSMGR; + css::uno::Reference< css::frame::XFrame > m_xFrame; + css::uno::Reference< css::container::XNameAccess > m_xGlobalCategoryInfo; + css::uno::Reference< css::container::XNameAccess > m_xModuleCategoryInfo; + css::uno::Reference< css::container::XNameAccess > m_xUICmdDescription; + + Image GetImage( ::com::sun::star::uno::Reference< ::com::sun::star::script::browse::XBrowseNode > node, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xCtx, bool bIsRootNode, bool bHighContrast ); + + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > getDocumentModel( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xCtx, ::rtl::OUString& docName ); + ::rtl::OUString parseLocationName( const ::rtl::OUString& location ); + + void InitModule(); + void InitBasic(); + void InitStyles(); + + ::rtl::OUString MapCommand2UIName(const ::rtl::OUString& sCommand); + + SfxStylesInfo_Impl* pStylesInfo; + +protected: + virtual void RequestingChilds( SvLBoxEntry *pEntry); + using SvListView::Expand; + virtual BOOL Expand( SvLBoxEntry* pParent ); + +public: + SfxConfigGroupListBox_Impl ( Window* pParent, + const ResId&, + ULONG nConfigMode = 0 ); + ~SfxConfigGroupListBox_Impl(); + void ClearAll(); + + void Init(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR , + const css::uno::Reference< css::frame::XFrame >& xFrame , + const ::rtl::OUString& sModuleLongName); + void SetFunctionListBox( SfxConfigFunctionListBox_Impl *pBox ) + { pFunctionListBox = pBox; } + void Open( SvLBoxEntry*, BOOL ); + void GroupSelected(); + void SelectMacro( const SfxMacroInfoItem* ); + void AddAndSelect( const SfxStringItem*, const SfxStringItem* ); + void SelectMacro( const String&, const String& ); + String GetGroup(); + BasicManager* GetBasicManager( const SvLBoxEntry& _rEntry ); + void SetScriptType( const String& rScriptType ); + void SetStylesInfo(SfxStylesInfo_Impl* pStyles); +}; + +#undef css + +#endif + diff --git a/svx/source/dialog/chardlg.cxx b/svx/source/cui/chardlg.cxx index b1969f17a185..0d0b6de205de 100644 --- a/svx/source/dialog/chardlg.cxx +++ b/svx/source/cui/chardlg.cxx @@ -57,32 +57,6 @@ //Erstmal definieren, damit die Klassendeklarionen angezogen werden. - - - - - - - - - - - - - - - - - - - - - - - - - - #include <svx/xtable.hxx> // XColorTable #include "chardlg.hxx" #include "fontitem.hxx" @@ -108,7 +82,7 @@ #include "dlgutil.hxx" #include <svx/dialmgr.hxx> #include "htmlmode.hxx" -#include <svx/charmap.hxx> +#include "cuicharmap.hxx" #include "chardlg.h" #include <svx/emphitem.hxx> #include <svx/charreliefitem.hxx> @@ -122,6 +96,7 @@ #include <svtools/intitem.hxx> //CHINA001 #include <sfx2/request.hxx> //CHINA001 #include "flagsdef.hxx" //CHINA001 + using namespace ::com::sun::star; // define ---------------------------------------------------------------- @@ -3886,16 +3861,16 @@ void SvxCharTwoLinesPage::SelectCharacter( ListBox* pBox ) { //CHINA001 SvxCharacterMap aDlg( this ); bool bStart = pBox == &m_aStartBracketLB; - SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - if(pFact) + //SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); + //if(pFact) { - AbstractSvxCharacterMap* aDlg = pFact->CreateSvxCharacterMap( this, RID_SVXDLG_CHARMAP ); - DBG_ASSERT(aDlg, "Dialogdiet fail!");//CHINA001 + //AbstractSvxCharacterMap* aDlg = pFact->CreateSvxCharacterMap( this, RID_SVXDLG_CHARMAP ); + SvxCharacterMap* aDlg = new SvxCharacterMap( this ); aDlg->DisableFontSelection();//CHINA001 aDlg.DisableFontSelection(); if ( aDlg->Execute() == RET_OK )//CHINA001 ( aDlg.Execute() == RET_OK ) { - sal_Unicode cChar = aDlg->GetChar();//CHINA001 aDlg.GetChar(); + sal_Unicode cChar = (sal_Unicode) aDlg->GetChar();//CHINA001 aDlg.GetChar(); SetBracket( cChar, bStart ); } else diff --git a/svx/source/dialog/chardlg.h b/svx/source/cui/chardlg.h index 83af82c3118c..83af82c3118c 100644 --- a/svx/source/dialog/chardlg.h +++ b/svx/source/cui/chardlg.h diff --git a/svx/source/dialog/chardlg.hrc b/svx/source/cui/chardlg.hrc index 63faba788bbe..63faba788bbe 100644 --- a/svx/source/dialog/chardlg.hrc +++ b/svx/source/cui/chardlg.hrc diff --git a/svx/source/dialog/chardlg.hxx b/svx/source/cui/chardlg.hxx index d767d8ddd8f3..d767d8ddd8f3 100644 --- a/svx/source/dialog/chardlg.hxx +++ b/svx/source/cui/chardlg.hxx diff --git a/svx/source/dialog/chardlg.src b/svx/source/cui/chardlg.src index 19ad1e090435..19ad1e090435 100644 --- a/svx/source/dialog/chardlg.src +++ b/svx/source/cui/chardlg.src diff --git a/svx/source/dialog/charmap.hrc b/svx/source/cui/charmap.hrc index cbadf151c589..49dae5c98f06 100644 --- a/svx/source/dialog/charmap.hrc +++ b/svx/source/cui/charmap.hrc @@ -45,6 +45,10 @@ #define BTN_DELETE 20 #define FT_SUBSET 30 #define LB_SUBSET 31 +#define ED_SHORTCUT 32 +#define BT_ASSIGN 33 +#define FT_ASSIGN 34 +#define CT_ASSIGN 35 #endif diff --git a/svx/source/cui/charmap.src b/svx/source/cui/charmap.src new file mode 100644 index 000000000000..8b93fe850887 --- /dev/null +++ b/svx/source/cui/charmap.src @@ -0,0 +1,161 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: charmap.src,v $ + * $Revision: 1.57 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + + // include --------------------------------------------------------------- +#include <svx/svxids.hrc> +#include <svx/dialogs.hrc> +#include "charmap.hrc" +#include "helpid.hrc" + + // RID_SVXDLG_CHARMAP ---------------------------------------------------- +ModalDialog RID_SVXDLG_CHARMAP +{ + HelpId = SID_CHARMAP ; + SvLook = TRUE ; + Text [ en-US ] = "Special Characters"; +/* Size = MAP_APPFONT ( 297 , 169 ) ; */ + Size = MAP_APPFONT ( 297 , 153 ) ; + OutputSize = TRUE ; + Moveable = TRUE ; + Control CT_SHOWSET + { + HelpId = HID_CHARMAP_CTL_SHOWSET ; + Border = TRUE ; + Pos = MAP_APPFONT ( 6 , 24 ) ; + Size = MAP_APPFONT ( 230 , 112 ) ; + TabStop = TRUE ; + Group = TRUE ; + }; + FixedText FT_FONT + { + Pos = MAP_APPFONT ( 6 , 8 ) ; + Size = MAP_APPFONT ( 33 , 8 ) ; + Text [ en-US ] = "~Font" ; + Left = TRUE ; + Group = TRUE ; + }; + ListBox LB_FONT + { + Pos = MAP_APPFONT ( 42 , 6 ) ; + Size = MAP_APPFONT ( 70 , 58 ) ; + Sort = TRUE ; + TabStop = TRUE ; + DropDown = TRUE ; + }; + FixedText FT_SUBSET + { + Pos = MAP_APPFONT ( 118 , 8 ) ; + Size = MAP_APPFONT ( 42 , 8 ) ; + Text [ en-US ] = "~Subset"; + }; + ListBox LB_SUBSET + { + Pos = MAP_APPFONT ( 161 , 6 ) ; + Size = MAP_APPFONT ( 63 , 68 ) ; + Sort = FALSE ; + TabStop = TRUE ; + DropDown = TRUE ; + }; + FixedText FT_SYMBOLE + { + Pos = MAP_APPFONT ( 6 , 140 ) ; + Size = MAP_APPFONT ( 38 , 8 ) ; + Left = TRUE ; + Text [ en-US ] = "Characters:"; + }; + Control CT_SHOWTEXT + { + HelpId = HID_CHARMAP_CTL_SHOWTEXT ; + Pos = MAP_APPFONT ( 46 , 137 ) ; +/* Size = MAP_APPFONT ( 190 , 16 ) ; */ + Size = MAP_APPFONT ( 244 , 16 ) ; + Group = TRUE ; + }; + Control CT_SHOWCHAR + { + HelpId = HID_CHARMAP_CTL_SHOWCHAR ; + Pos = MAP_APPFONT ( 241 , 79 ) ; + Size = MAP_APPFONT ( 50 , 44 ) ; + Group = TRUE ; + }; + FixedText FT_CHARCODE + { + Pos = MAP_APPFONT ( 241 , 126 ) ; + Size = MAP_APPFONT ( 50 , 8 ) ; + Center = TRUE ; + }; + OKButton BTN_CHAR_OK + { + Pos = MAP_APPFONT ( 242 , 6 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + TabStop = TRUE ; + DefButton = TRUE ; + }; + CancelButton BTN_CHAR_CANCEL + { + Pos = MAP_APPFONT ( 242 , 23 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + TabStop = TRUE ; + }; + HelpButton BTN_CHAR_HELP + { + Pos = MAP_APPFONT ( 242 , 43 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + TabStop = TRUE ; + }; + PushButton BTN_DELETE + { + Pos = MAP_APPFONT ( 242 , 63 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + Text [ en-US ] = "~Delete"; + }; +/* + PushButton BT_ASSIGN + { + Pos = MAP_APPFONT ( 242 , 140 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + Text [ en-US ] = "~Assign shortcut..."; + }; + FixedText FT_ASSIGN + { + Pos = MAP_APPFONT ( 6 , 156 ) ; + Size = MAP_APPFONT ( 100 , 8 ) ; + Left = TRUE ; + Text [ en-US ] = "Shortcut key: "; + }; + Control CT_ASSIGN + { + Pos = MAP_APPFONT ( 60 , 156 ) ; + Size = MAP_APPFONT ( 160 , 8 ) ; + }; +*/ +}; + +// ********************************************************************** EOF diff --git a/svx/source/dialog/commonlingui.cxx b/svx/source/cui/commonlingui.cxx index 161e1e2bf206..161e1e2bf206 100644 --- a/svx/source/dialog/commonlingui.cxx +++ b/svx/source/cui/commonlingui.cxx diff --git a/svx/source/dialog/commonlingui.hxx b/svx/source/cui/commonlingui.hxx index 64abdf66e934..d1781e83348f 100644 --- a/svx/source/dialog/commonlingui.hxx +++ b/svx/source/cui/commonlingui.hxx @@ -40,13 +40,12 @@ #endif #include <vcl/group.hxx> #include <vcl/dialog.hxx> -#include "svx/svxdllapi.h" //============================================================================= // SvxClickInfoCtr //============================================================================= -class SVX_DLLPUBLIC SvxClickInfoCtr: public Control +class SvxClickInfoCtr: public Control { private: FixedInfo aFixedInfo; @@ -71,7 +70,7 @@ protected: //============================================================================= // SvxCommonLinguisticControl //============================================================================= -class SVX_DLLPUBLIC SvxCommonLinguisticControl : public Window +class SvxCommonLinguisticControl : public Window { public: enum ButtonType diff --git a/svx/source/dialog/commonlingui.src b/svx/source/cui/commonlingui.src index b69d3449db4c..b69d3449db4c 100644 --- a/svx/source/dialog/commonlingui.src +++ b/svx/source/cui/commonlingui.src diff --git a/svx/source/dialog/connect.cxx b/svx/source/cui/connect.cxx index 739828ec9ccb..739828ec9ccb 100644 --- a/svx/source/dialog/connect.cxx +++ b/svx/source/cui/connect.cxx diff --git a/svx/source/dialog/connect.hxx b/svx/source/cui/connect.hxx index d7d0c21e34f4..d7d0c21e34f4 100644 --- a/svx/source/dialog/connect.hxx +++ b/svx/source/cui/connect.hxx diff --git a/svx/source/dialog/connect.src b/svx/source/cui/connect.src index a2bd502e1717..a2bd502e1717 100644 --- a/svx/source/dialog/connect.src +++ b/svx/source/cui/connect.src diff --git a/svx/source/dialog/connpoolconfig.cxx b/svx/source/cui/connpoolconfig.cxx index f787168f1f2d..f787168f1f2d 100644 --- a/svx/source/dialog/connpoolconfig.cxx +++ b/svx/source/cui/connpoolconfig.cxx diff --git a/svx/source/dialog/connpoolconfig.hxx b/svx/source/cui/connpoolconfig.hxx index 248dd16146f0..248dd16146f0 100644 --- a/svx/source/dialog/connpoolconfig.hxx +++ b/svx/source/cui/connpoolconfig.hxx diff --git a/svx/source/dialog/connpooloptions.cxx b/svx/source/cui/connpooloptions.cxx index d7874bc8d4cb..d7874bc8d4cb 100644 --- a/svx/source/dialog/connpooloptions.cxx +++ b/svx/source/cui/connpooloptions.cxx diff --git a/svx/source/dialog/connpooloptions.hrc b/svx/source/cui/connpooloptions.hrc index 89f3ae64e1f8..89f3ae64e1f8 100644 --- a/svx/source/dialog/connpooloptions.hrc +++ b/svx/source/cui/connpooloptions.hrc diff --git a/svx/source/dialog/connpooloptions.hxx b/svx/source/cui/connpooloptions.hxx index 27f3076b58ed..019061efdb2e 100644 --- a/svx/source/dialog/connpooloptions.hxx +++ b/svx/source/cui/connpooloptions.hxx @@ -32,15 +32,11 @@ #define _OFFAPP_CONNPOOLOPTIONS_HXX_ #include <svtools/solar.hrc> -#define SID_SB_POOLING_ENABLED (RID_OFA_START + 247) -#define SID_SB_DRIVER_TIMEOUTS (RID_OFA_START + 248) -#define SID_SB_DB_REGISTER (RID_OFA_START + 249) #include <sfx2/tabdlg.hxx> #include <vcl/fixed.hxx> -#ifndef _SV_BUTTON_HXX #include <vcl/button.hxx> -#endif #include <vcl/field.hxx> +#include <databaseregistrationui.hxx> //........................................................................ namespace offapp diff --git a/svx/source/dialog/connpooloptions.src b/svx/source/cui/connpooloptions.src index 9218efda609a..9218efda609a 100644 --- a/svx/source/dialog/connpooloptions.src +++ b/svx/source/cui/connpooloptions.src diff --git a/svx/source/dialog/connpoolsettings.cxx b/svx/source/cui/connpoolsettings.cxx index 6e1986f36e22..6e1986f36e22 100644 --- a/svx/source/dialog/connpoolsettings.cxx +++ b/svx/source/cui/connpoolsettings.cxx diff --git a/svx/source/dialog/connpoolsettings.hxx b/svx/source/cui/connpoolsettings.hxx index 80ae105d0521..80ae105d0521 100644 --- a/svx/source/dialog/connpoolsettings.hxx +++ b/svx/source/cui/connpoolsettings.hxx diff --git a/svx/source/cui/cuicharmap.cxx b/svx/source/cui/cuicharmap.cxx new file mode 100644 index 000000000000..fa962beafc3d --- /dev/null +++ b/svx/source/cui/cuicharmap.cxx @@ -0,0 +1,591 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: cuicharmap.cxx,v $ + * $Revision: 1.10 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_svx.hxx" + +#ifdef SVX_DLLIMPLEMENTATION +#undef SVX_DLLIMPLEMENTATION +#endif + +// include --------------------------------------------------------------- + +#include <stdio.h> + +#define _CUI_CHARMAP_CXX_ +#include <tools/shl.hxx> +#include <tools/debug.hxx> +#include <vcl/sound.hxx> +#include <vcl/svapp.hxx> +#include <vcl/msgbox.hxx> +#include <svtools/colorcfg.hxx> +#include <svtools/eitem.hxx> +#include <svtools/intitem.hxx> +#include <svtools/stritem.hxx> +#include <svtools/itempool.hxx> + +#include <rtl/textenc.h> +#include <svx/ucsubset.hxx> + +#include <svx/dialogs.hrc> +#include <svx/dialmgr.hxx> +#include "cuicharmap.hxx" +#include <sfx2/request.hxx> +#include <sfx2/sfxsids.hrc> +#include <sfx2/app.hxx> +#include <fontitem.hxx> +#include "charmap.hrc" +#include "macroass.hxx" + +// class SvxCharacterMap ================================================= + +SvxCharacterMap::SvxCharacterMap( Window* pParent, BOOL bOne, const SfxItemSet* pSet ) : + SfxModalDialog( pParent, SVX_RES( RID_SVXDLG_CHARMAP ) ), + mpCharMapData( 0 ) +{ + SFX_ITEMSET_ARG( pSet, pItem, SfxBoolItem, FN_PARAM_1, FALSE ); + if ( pItem ) + bOne = pItem->GetValue(); + + SFX_ITEMSET_ARG( pSet, pCharItem, SfxInt32Item, SID_ATTR_CHAR, FALSE ); + if ( pCharItem ) + SetChar( pItem->GetValue() ); + + mpCharMapData = new SvxCharMapData( this, bOne, &DIALOG_MGR() ); + + SFX_ITEMSET_ARG( pSet, pDisableItem, SfxBoolItem, FN_PARAM_2, FALSE ); + if ( pDisableItem && pDisableItem->GetValue() ) + DisableFontSelection(); + + SFX_ITEMSET_ARG( pSet, pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, FALSE ); + SFX_ITEMSET_ARG( pSet, pFontNameItem, SfxStringItem, SID_FONT_NAME, FALSE ); + if ( pFontItem ) + { + Font aFont( pFontItem->GetFamilyName(), pFontItem->GetStyleName(), GetCharFont().GetSize() ); + aFont.SetCharSet( pFontItem->GetCharSet() ); + aFont.SetPitch( pFontItem->GetPitch() ); + SetCharFont( aFont ); + } + else if ( pFontNameItem ) + { + Font aFont( GetCharFont() ); + aFont.SetName( pFontNameItem->GetValue() ); + SetCharFont( aFont ); + } + + FreeResource(); + CreateOutputItemSet( pSet ? *pSet->GetPool() : SFX_APP()->GetPool() ); +} + +// ----------------------------------------------------------------------- + +SvxCharacterMap::~SvxCharacterMap() +{ + delete mpCharMapData; +} + +// ----------------------------------------------------------------------- + +const Font& SvxCharacterMap::GetCharFont() const +{ + return mpCharMapData->aFont; +} + +// ----------------------------------------------------------------------- + +void SvxCharacterMap::SetChar( sal_UCS4 c ) +{ + mpCharMapData->aShowSet.SelectCharacter( c ); +} + +// ----------------------------------------------------------------------- + +sal_UCS4 SvxCharacterMap::GetChar() const +{ + return mpCharMapData->aShowSet.GetSelectCharacter(); +} + +// ----------------------------------------------------------------------- + +String SvxCharacterMap::GetCharacters() const +{ + return mpCharMapData->aShowText.GetText(); +} + + +// ----------------------------------------------------------------------- + +void SvxCharacterMap::DisableFontSelection() +{ + mpCharMapData->aFontText.Disable(); + mpCharMapData->aFontLB.Disable(); +} + +void SvxCharacterMap::SetCharFont( const Font& rFont ) +{ + mpCharMapData->SetCharFont( rFont ); +} + +short SvxCharacterMap::Execute() +{ + short nResult = SfxModalDialog::Execute(); + if ( nResult == RET_OK ) + { + SfxItemSet* pSet = GetItemSet(); + if ( pSet ) + { + const SfxItemPool* pPool = pSet->GetPool(); + const Font& rFont( GetCharFont() ); + pSet->Put( SfxStringItem( pPool->GetWhich(SID_CHARMAP), GetCharacters() ) ); + pSet->Put( SvxFontItem( rFont.GetFamily(), rFont.GetName(), + rFont.GetStyleName(), rFont.GetPitch(), rFont.GetCharSet(), pPool->GetWhich(SID_ATTR_CHAR_FONT) ) ); + pSet->Put( SfxStringItem( pPool->GetWhich(SID_FONT_NAME), rFont.GetName() ) ); + pSet->Put( SfxInt32Item( pPool->GetWhich(SID_ATTR_CHAR), GetChar() ) ); + } + } + + return nResult; +} + + +// class SvxShowText ===================================================== + +SvxShowText::SvxShowText( Window* pParent, const ResId& rResId, BOOL bCenter ) +: Control( pParent, rResId ), + mbCenter( bCenter) +{} + +// ----------------------------------------------------------------------- + +void SvxShowText::Paint( const Rectangle& ) +{ + Color aTextCol = GetTextColor(); + + const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); + const Color aWindowTextColor( rStyleSettings.GetDialogTextColor() ); + SetTextColor( aWindowTextColor ); + + const String aText = GetText(); + const Size aSize = GetOutputSizePixel(); + Point aPoint( 2, mnY ); + + // adjust position using ink boundary if possible + Rectangle aBoundRect; + if( !GetTextBoundRect( aBoundRect, aText ) || aBoundRect.IsEmpty() ) + aPoint.X() = (aSize.Width() - GetTextWidth( aText )) / 2; + else + { + // adjust position before it gets out of bounds + aBoundRect += aPoint; + + // shift back vertically if needed + int nYLDelta = aBoundRect.Top(); + int nYHDelta = aSize.Height() - aBoundRect.Bottom(); + if( nYLDelta <= 0 ) + aPoint.Y() -= nYLDelta - 1; + else if( nYHDelta <= 0 ) + aPoint.Y() += nYHDelta - 1; + + if( mbCenter ) + { + // move glyph to middle of cell + aPoint.X() = -aBoundRect.Left() + + (aSize.Width() - aBoundRect.GetWidth()) / 2; + } + else + { + // shift back horizontally if needed + int nXLDelta = aBoundRect.Left(); + int nXHDelta = aSize.Width() - aBoundRect.Right(); + if( nXLDelta <= 0 ) + aPoint.X() -= nXLDelta - 1; + else if( nXHDelta <= 0 ) + aPoint.X() += nXHDelta - 1; + } + } + + DrawText( aPoint, aText ); + SetTextColor( aTextCol ); +} + +// ----------------------------------------------------------------------- + +void SvxShowText::SetFont( const Font& rFont ) +{ + long nWinHeight = GetOutputSizePixel().Height(); + Font aFont = rFont; + aFont.SetWeight( WEIGHT_NORMAL ); + aFont.SetAlign( ALIGN_TOP ); + aFont.SetSize( PixelToLogic( Size( 0, nWinHeight/2 ) ) ); + aFont.SetTransparent( TRUE ); + Control::SetFont( aFont ); + mnY = ( nWinHeight - GetTextHeight() ) / 2; + + Invalidate(); +} + +// ----------------------------------------------------------------------- + +void SvxShowText::SetText( const String& rText ) +{ + Control::SetText( rText ); + Invalidate(); +} + +// ----------------------------------------------------------------------- + +SvxShowText::~SvxShowText() +{} + +// class SvxCharacterMap ================================================= + +SvxCharMapData::SvxCharMapData( SfxModalDialog* pDialog, BOOL bOne_, ResMgr* pResContext ) +: mpDialog( pDialog ), + aShowSet ( pDialog, ResId( CT_SHOWSET, *pResContext ) ), + aShowText ( pDialog, ResId( CT_SHOWTEXT, *pResContext ) ), +// aShowShortcut ( pDialog, ResId( CT_ASSIGN, *pResContext ) ), + aOKBtn ( pDialog, ResId( BTN_CHAR_OK, *pResContext ) ), + aCancelBtn ( pDialog, ResId( BTN_CHAR_CANCEL, *pResContext ) ), + aHelpBtn ( pDialog, ResId( BTN_CHAR_HELP, *pResContext ) ), + aDeleteBtn ( pDialog, ResId( BTN_DELETE, *pResContext ) ), +// aAssignBtn ( pDialog, ResId( BT_ASSIGN, *pResContext ) ), + aFontText ( pDialog, ResId( FT_FONT, *pResContext ) ), + aFontLB ( pDialog, ResId( LB_FONT, *pResContext ) ), + aSubsetText ( pDialog, ResId( FT_SUBSET, *pResContext ) ), + aSubsetLB ( pDialog, ResId( LB_SUBSET, *pResContext ) ), + aSymbolText ( pDialog, ResId( FT_SYMBOLE, *pResContext ) ), + aShowChar ( pDialog, ResId( CT_SHOWCHAR, *pResContext ), TRUE ), + aCharCodeText ( pDialog, ResId( FT_CHARCODE, *pResContext ) ), +// aAssignText ( pDialog, ResId( FT_ASSIGN, *pResContext ) ), + bOne( bOne_ ), + pSubsetMap( NULL ) +{ + aFont = pDialog->GetFont(); + aFont.SetTransparent( TRUE ); + aFont.SetFamily( FAMILY_DONTKNOW ); + aFont.SetPitch( PITCH_DONTKNOW ); + aFont.SetCharSet( RTL_TEXTENCODING_DONTKNOW ); + + if ( bOne ) + { + Size aDlgSize = pDialog->GetSizePixel(); + pDialog->SetSizePixel( Size( aDlgSize.Width(), + aDlgSize.Height()-aShowText.GetSizePixel().Height() ) ); + aSymbolText.Hide(); + aShowText.Hide(); + aDeleteBtn.Hide(); + } + + String aDefStr( aFont.GetName() ); + String aLastName; + int nCount = mpDialog->GetDevFontCount(); + for ( int i = 0; i < nCount; i++ ) + { + String aFontName( mpDialog->GetDevFont( i ).GetName() ); + if ( aFontName != aLastName ) + { + aLastName = aFontName; + USHORT nPos = aFontLB.InsertEntry( aFontName ); + aFontLB.SetEntryData( nPos, (void*)(ULONG)i ); + } + } + // the font may not be in the list => + // try to find a font name token in list and select found font, + // else select topmost entry + FASTBOOL bFound = (aFontLB.GetEntryPos( aDefStr ) == LISTBOX_ENTRY_NOTFOUND ); + if( !bFound ) + { + for ( xub_StrLen i = 0; i < aDefStr.GetTokenCount(); ++i ) + { + String aToken = aDefStr.GetToken(i); + if ( aFontLB.GetEntryPos( aToken ) != LISTBOX_ENTRY_NOTFOUND ) + { + aDefStr = aToken; + bFound = TRUE; + break; + } + } + } + + if ( bFound ) + aFontLB.SelectEntry( aDefStr ); + else if ( aFontLB.GetEntryCount() ) + aFontLB.SelectEntryPos(0); + FontSelectHdl( &aFontLB ); + + aOKBtn.SetClickHdl( LINK( this, SvxCharMapData, OKHdl ) ); + aFontLB.SetSelectHdl( LINK( this, SvxCharMapData, FontSelectHdl ) ); + aSubsetLB.SetSelectHdl( LINK( this, SvxCharMapData, SubsetSelectHdl ) ); + aShowSet.SetDoubleClickHdl( LINK( this, SvxCharMapData, CharDoubleClickHdl ) ); + aShowSet.SetSelectHdl( LINK( this, SvxCharMapData, CharSelectHdl ) ); + aShowSet.SetHighlightHdl( LINK( this, SvxCharMapData, CharHighlightHdl ) ); + aShowSet.SetPreSelectHdl( LINK( this, SvxCharMapData, CharPreSelectHdl ) ); + aDeleteBtn.SetClickHdl( LINK( this, SvxCharMapData, DeleteHdl ) ); +// aAssignBtn.SetClickHdl( LINK( this, SvxCharMapData, AssignHdl ) ); + + if( SvxShowCharSet::getSelectedChar() == ' ') + aOKBtn.Disable(); + else + aOKBtn.Enable(); + + // left align aShowText field + int nLeftEdge = aSymbolText.GetPosPixel().X(); + nLeftEdge += aSymbolText.GetTextWidth( aSymbolText.GetText() ); + Size aNewSize = aShowText.GetOutputSizePixel(); + aShowText.SetPosPixel( Point( nLeftEdge+4, aShowText.GetPosPixel().Y() ) ); +} + +// ----------------------------------------------------------------------- + +void SvxCharMapData::SetCharFont( const Font& rFont ) +{ + // first get the underlying info in order to get font names + // like "Times New Roman;Times" resolved + Font aTmp( mpDialog->GetFontMetric( rFont ) ); + + if ( aFontLB.GetEntryPos( aTmp.GetName() ) == LISTBOX_ENTRY_NOTFOUND ) + return; + + aFontLB.SelectEntry( aTmp.GetName() ); + aFont = aTmp; + FontSelectHdl( &aFontLB ); + + // for compatibility reasons + mpDialog->ModalDialog::SetFont( aFont ); +} + +// ----------------------------------------------------------------------- + +IMPL_LINK( SvxCharMapData, OKHdl, OKButton *, EMPTYARG ) +{ + String aStr = aShowText.GetText(); + + if ( !aStr.Len() ) + { + sal_UCS4 cChar = aShowSet.GetSelectCharacter(); + // using the new UCS4 constructor + rtl::OUString aOUStr( &cChar, 1 ); + aShowText.SetText( aOUStr ); + } + mpDialog->EndDialog( TRUE ); + return 0; +} + +// ----------------------------------------------------------------------- + +IMPL_LINK( SvxCharMapData, FontSelectHdl, ListBox *, EMPTYARG ) +{ + USHORT nPos = aFontLB.GetSelectEntryPos(), + nFont = (USHORT)(ULONG)aFontLB.GetEntryData( nPos ); + aFont = mpDialog->GetDevFont( nFont ); + + // notify children using this font + aShowSet.SetFont( aFont ); + aShowChar.SetFont( aFont ); + aShowText.SetFont( aFont ); + + // right align some fields to aShowSet + int nRightEdge = aShowSet.GetPosPixel().X() + aShowSet.GetOutputSizePixel().Width(); + Size aNewSize = aSubsetLB.GetOutputSizePixel(); + aNewSize.setWidth( nRightEdge - aSubsetLB.GetPosPixel().X() ); + aSubsetLB.SetOutputSizePixel( aNewSize ); + + // setup unicode subset listbar with font specific subsets, + // hide unicode subset listbar for symbol fonts + // TODO: get info from the Font once it provides it + if( pSubsetMap) + delete pSubsetMap; + pSubsetMap = NULL; + + BOOL bNeedSubset = (aFont.GetCharSet() != RTL_TEXTENCODING_SYMBOL); + if( bNeedSubset ) + { + FontCharMap aFontCharMap; + aShowSet.GetFontCharMap( aFontCharMap ); + pSubsetMap = new SubsetMap( &aFontCharMap ); + + // update subset listbox for new font's unicode subsets + aSubsetLB.Clear(); + // TODO: is it worth to improve the stupid linear search? + bool bFirst = true; + const Subset* s; + while( NULL != (s = pSubsetMap->GetNextSubset( bFirst )) ) + { + USHORT nPos_ = aSubsetLB.InsertEntry( s->GetName() ); + aSubsetLB.SetEntryData( nPos_, (void*)s ); + // NOTE: subset must live at least as long as the selected font + if( bFirst ) + aSubsetLB.SelectEntryPos( nPos_ ); + bFirst = false; + } + if( aSubsetLB.GetEntryCount() <= 1 ) + bNeedSubset = FALSE; + } + + aSubsetText.Show( bNeedSubset); + aSubsetLB.Show( bNeedSubset); + + return 0; +} + +// ----------------------------------------------------------------------- + +IMPL_LINK( SvxCharMapData, SubsetSelectHdl, ListBox *, EMPTYARG ) +{ + USHORT nPos = aSubsetLB.GetSelectEntryPos(); + const Subset* pSubset = reinterpret_cast<const Subset*> (aSubsetLB.GetEntryData(nPos)); + if( pSubset ) + { + sal_UCS4 cFirst = pSubset->GetRangeMin(); + aShowSet.SelectCharacter( cFirst ); + } + aSubsetLB.SelectEntryPos( nPos ); + return 0; +} + +// ----------------------------------------------------------------------- + +IMPL_LINK( SvxCharMapData, CharDoubleClickHdl, Control *, EMPTYARG ) +{ + mpDialog->EndDialog( TRUE ); + return 0; +} + +// ----------------------------------------------------------------------- + +IMPL_LINK( SvxCharMapData, CharSelectHdl, Control *, EMPTYARG ) +{ + if ( !bOne ) + { + String aText = aShowText.GetText(); + + if ( aText.Len() == CHARMAP_MAXLEN ) + Sound::Beep( SOUND_WARNING ); + else + { + sal_UCS4 cChar = aShowSet.GetSelectCharacter(); + // using the new UCS4 constructor + rtl::OUString aOUStr( &cChar, 1 ); + aShowText.SetText( aText + aOUStr ); + } + + } + aOKBtn.Enable(); + return 0; +} + +// ----------------------------------------------------------------------- + +IMPL_LINK( SvxCharMapData, CharHighlightHdl, Control *, EMPTYARG ) +{ + String aText; + sal_UCS4 cChar = aShowSet.GetSelectCharacter(); + sal_Bool bSelect = (cChar > 0); + + // show char sample + if ( bSelect ) + { + // using the new UCS4 constructor + aText = rtl::OUString( &cChar, 1 ); + + const Subset* pSubset = NULL; + if( pSubsetMap ) + pSubset = pSubsetMap->GetSubsetByUnicode( cChar ); + if( pSubset ) + aSubsetLB.SelectEntry( pSubset->GetName() ); + else + aSubsetLB.SetNoSelection(); + } + aShowChar.SetText( aText ); + aShowChar.Update(); + + // show char code + if ( bSelect ) + { + char aBuf[32]; + snprintf( aBuf, sizeof(aBuf), "U+%04X", static_cast<unsigned>(cChar) ); + if( cChar < 0x0100 ) + snprintf( aBuf+6, sizeof(aBuf)-6, " (%u)", static_cast<unsigned>(cChar) ); + aText = String::CreateFromAscii( aBuf ); + } + aCharCodeText.SetText( aText ); + + return 0; +} + +// ----------------------------------------------------------------------- + +IMPL_LINK( SvxCharMapData, CharPreSelectHdl, Control *, EMPTYARG ) +{ + // adjust subset selection + if( pSubsetMap ) + { + sal_UCS4 cChar = aShowSet.GetSelectCharacter(); + const Subset* pSubset = pSubsetMap->GetSubsetByUnicode( cChar ); + if( pSubset ) + aSubsetLB.SelectEntry( pSubset->GetName() ); + } + + aOKBtn.Enable(); + return 0; +} + +// ----------------------------------------------------------------------- + +IMPL_LINK( SvxCharMapData, DeleteHdl, PushButton *, EMPTYARG ) +{ + aShowText.SetText( String() ); + aOKBtn.Disable(); + return 0; +} + +#include <sfx2/objsh.hxx> +#include <vcl/msgbox.hxx> +#include <svtools/stritem.hxx> + +IMPL_LINK( SvxCharMapData, AssignHdl, PushButton *, EMPTYARG ) +{ + SfxAllItemSet aSet( SfxObjectShell::Current()->GetPool() ); + aSet.Put( SfxStringItem( SID_CHARMAP, String::CreateFromAscii("test") ) ); + SfxModalDialog* pDlg = new SfxMacroAssignDlg( mpDialog, com::sun::star::uno::Reference < com::sun::star::frame::XFrame >(), aSet ); + if ( pDlg && pDlg->Execute() == RET_OK ) + { + const SfxItemSet* pOutSet = pDlg->GetOutputItemSet(); + const SfxPoolItem* pItem; + if( SFX_ITEM_SET == pOutSet->GetItemState( SID_CHARMAP, FALSE, &pItem ) ) + { + // show assigned shortcut + } + } + + delete pDlg; + + return 0; +} diff --git a/svx/source/dialog/cuicharmap.hxx b/svx/source/cui/cuicharmap.hxx index 0627f8640c83..b8544bd98dea 100644 --- a/svx/source/dialog/cuicharmap.hxx +++ b/svx/source/cui/cuicharmap.hxx @@ -34,9 +34,11 @@ #include <vcl/ctrl.hxx> #include <vcl/metric.hxx> -#include <vcl/scrbar.hxx> +#include <vcl/button.hxx> +#include <vcl/fixed.hxx> +#include <vcl/lstbox.hxx> #include <sfx2/basedlgs.hxx> -#include <map> +#include <svx/charmap.hxx> class SubsetMap; class SvxCharMapData; @@ -44,8 +46,6 @@ class SvxCharMapData; // define ---------------------------------------------------------------- #define CHARMAP_MAXLEN 32 -#define COLUMN_COUNT 16 -#define ROW_COUNT 8 namespace svx { @@ -56,25 +56,90 @@ namespace svx // the main purpose of this dialog is to enable the use of characters // that are not easily accesible from the keyboard +// class SvxShowText ===================================================== + +class SvxShowText : public Control +{ +public: + SvxShowText( Window* pParent, + const ResId& rResId, + BOOL bCenter = FALSE ); + ~SvxShowText(); + + void SetFont( const Font& rFont ); + void SetText( const String& rText ); + +protected: + virtual void Paint( const Rectangle& ); + +private: + long mnY; + BOOL mbCenter; + +}; + +class SvxCharMapData +{ +public: + SvxCharMapData( class SfxModalDialog* pDialog, BOOL bOne_, ResMgr* pResContext ); + + void SetCharFont( const Font& rFont ); + +private: +friend class SvxCharacterMap; + SfxModalDialog* mpDialog; + + SvxShowCharSet aShowSet; + SvxShowText aShowText; +// SvxShowText aShowShortcut; + OKButton aOKBtn; + CancelButton aCancelBtn; + HelpButton aHelpBtn; + PushButton aDeleteBtn; +// PushButton aAssignBtn; + FixedText aFontText; + ListBox aFontLB; + FixedText aSubsetText; + ListBox aSubsetLB; + FixedText aSymbolText; + SvxShowText aShowChar; + FixedText aCharCodeText; +// FixedText aAssignText; + Font aFont; + BOOL bOne; + const SubsetMap* pSubsetMap; + + DECL_LINK( OKHdl, OKButton* ); + DECL_LINK( FontSelectHdl, ListBox* ); + DECL_LINK( SubsetSelectHdl, ListBox* ); + DECL_LINK( CharDoubleClickHdl, Control* pControl ); + DECL_LINK( CharSelectHdl, Control* pControl ); + DECL_LINK( CharHighlightHdl, Control* pControl ); + DECL_LINK( CharPreSelectHdl, Control* pControl ); + DECL_LINK( DeleteHdl, PushButton* pBtn ); + DECL_LINK( AssignHdl, PushButton* pBtn ); +}; + class SvxCharacterMap : public SfxModalDialog { private: - SvxCharMapData* const mpCharMapData; + SvxCharMapData* mpCharMapData; public: - SvxCharacterMap( Window* pParent, BOOL bOne = TRUE ); + SvxCharacterMap( Window* pParent, BOOL bOne=TRUE, const SfxItemSet* pSet=0 ); ~SvxCharacterMap(); void DisableFontSelection(); const Font& GetCharFont() const; void SetCharFont( const Font& rFont ); - void SetFont( const Font& rFont ) { SetCharFont( rFont ); } //! irgendwann entfernen void SetChar( sal_UCS4 ); sal_UCS4 GetChar() const; String GetCharacters() const; + + virtual short Execute(); }; #endif diff --git a/svx/source/dialog/cuiexp.cxx b/svx/source/cui/cuiexp.cxx index a0bed1362ee9..a0bed1362ee9 100644 --- a/svx/source/dialog/cuiexp.cxx +++ b/svx/source/cui/cuiexp.cxx diff --git a/svx/source/dialog/cuifmsearch.cxx b/svx/source/cui/cuifmsearch.cxx index b0c80f8297ef..b0c80f8297ef 100644 --- a/svx/source/dialog/cuifmsearch.cxx +++ b/svx/source/cui/cuifmsearch.cxx diff --git a/svx/source/dialog/cuifmsearch.hxx b/svx/source/cui/cuifmsearch.hxx index 5d8533a7b0b6..5d8533a7b0b6 100644 --- a/svx/source/dialog/cuifmsearch.hxx +++ b/svx/source/cui/cuifmsearch.hxx diff --git a/svx/source/dialog/cuigaldlg.cxx b/svx/source/cui/cuigaldlg.cxx index 3bac445b66e3..3bac445b66e3 100644 --- a/svx/source/dialog/cuigaldlg.cxx +++ b/svx/source/cui/cuigaldlg.cxx diff --git a/svx/source/dialog/cuigaldlg.hxx b/svx/source/cui/cuigaldlg.hxx index 62a5b3dc405a..62a5b3dc405a 100644 --- a/svx/source/dialog/cuigaldlg.hxx +++ b/svx/source/cui/cuigaldlg.hxx diff --git a/svx/source/dialog/cuigrfflt.cxx b/svx/source/cui/cuigrfflt.cxx index f1c70abf954f..830db3ae477a 100644 --- a/svx/source/dialog/cuigrfflt.cxx +++ b/svx/source/cui/cuigrfflt.cxx @@ -38,9 +38,7 @@ #include <vcl/msgbox.hxx> #include <sfx2/viewfrm.hxx> #include <sfx2/viewsh.hxx> -#ifndef _SFXOBJSH_HXX #include <sfx2/objsh.hxx> -#endif #include <sfx2/request.hxx> #include <svx/dialmgr.hxx> diff --git a/svx/source/dialog/cuigrfflt.hxx b/svx/source/cui/cuigrfflt.hxx index 061ada2568d1..061ada2568d1 100644 --- a/svx/source/dialog/cuigrfflt.hxx +++ b/svx/source/cui/cuigrfflt.hxx diff --git a/svx/source/dialog/cuihyperdlg.cxx b/svx/source/cui/cuihyperdlg.cxx index b29e202030b4..b29e202030b4 100644 --- a/svx/source/dialog/cuihyperdlg.cxx +++ b/svx/source/cui/cuihyperdlg.cxx diff --git a/svx/source/dialog/cuihyperdlg.hxx b/svx/source/cui/cuihyperdlg.hxx index c2f247f9455c..c2f247f9455c 100644 --- a/svx/source/dialog/cuihyperdlg.hxx +++ b/svx/source/cui/cuihyperdlg.hxx diff --git a/svx/source/cui/cuiimapdlg.hrc b/svx/source/cui/cuiimapdlg.hrc new file mode 100755 index 000000000000..00df9f23ee7a --- /dev/null +++ b/svx/source/cui/cuiimapdlg.hrc @@ -0,0 +1,50 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: imapdlg.hrc,v $ + * $Revision: 1.9 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#include <svx/dialogs.hrc> + +// ImapDlg-Dialoge +#define RID_SVX_IMAPDLG_START RID_SVX_IMAP_START + +#define RID_SVXDLG_IMAPURL (RID_SVX_IMAPDLG_START + 2) + +#define FT_URLDESCRIPTION 1 +#define FT_URL1 2 +#define FT_TARGET 3 +#define FT_NAME 4 +#define FT_DESCRIPTION 5 +#define EDT_URLDESCRIPTION 1 +#define EDT_URL 2 +#define EDT_NAME 3 +#define EDT_DESCRIPTION 4 +#define BTN_HELP1 1 +#define BTN_OK1 2 +#define BTN_CANCEL1 3 +#define FL_URL 1 +#define CBB_TARGETS 1 diff --git a/svx/source/cui/cuiimapdlg.src b/svx/source/cui/cuiimapdlg.src new file mode 100755 index 000000000000..de41ca0d1d55 --- /dev/null +++ b/svx/source/cui/cuiimapdlg.src @@ -0,0 +1,151 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: imapdlg.src,v $ + * $Revision: 1.53 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + // include --------------------------------------------------------------- +#include "helpid.hrc" +#include "cuiimapdlg.hrc" + // pragma ---------------------------------------------------------------- + +ModalDialog RID_SVXDLG_IMAPURL +{ + SVLook = TRUE ; + OutputSize = TRUE ; + Closeable = TRUE ; + Moveable = TRUE ; + Size = MAP_APPFONT ( 214 , 188 ) ; + Text [ en-US ] = "Properties" ; + + FixedText FT_URL1 + { + Pos = MAP_APPFONT ( 6 , 6 ) ; + Size = MAP_APPFONT ( 202 , 8 ) ; + Text [ en-US ] = "~URL" ; + }; + Edit EDT_URL + { + Border = TRUE ; + TabStop = TRUE ; + Left = TRUE ; + Pos = MAP_APPFONT ( 6 , 17 ) ; + Size = MAP_APPFONT ( 202 , 12 ) ; + }; + + FixedText FT_TARGET + { + Pos = MAP_APPFONT ( 6 , 32 ) ; + Size = MAP_APPFONT ( 202 , 8 ) ; + Text [ en-US ] = "F~rame" ; + }; + ComboBox CBB_TARGETS + { + Border = TRUE ; + Sort = TRUE ; + Pos = MAP_APPFONT ( 6 , 43 ) ; + Size = MAP_APPFONT ( 101 , 50 ) ; + TabStop = TRUE ; + DropDown = TRUE ; + HScroll = TRUE ; + }; + + FixedText FT_NAME + { + Pos = MAP_APPFONT ( 6 , 59 ) ; + Size = MAP_APPFONT ( 202 , 8 ) ; + Text [ en-US ] = "~Name" ; + }; + Edit EDT_NAME + { + Border = TRUE ; + TabStop = TRUE ; + Left = TRUE ; + Pos = MAP_APPFONT ( 6 , 70 ) ; + Size = MAP_APPFONT ( 202 , 12 ) ; + }; + + FixedText FT_URLDESCRIPTION + { + Pos = MAP_APPFONT ( 6 , 85 ) ; + Size = MAP_APPFONT ( 202 , 8 ) ; + Text [ en-US ] = "Alternative ~text" ; + }; + + Edit EDT_URLDESCRIPTION + { + Border = TRUE ; + TabStop = TRUE ; + Left = TRUE ; + Pos = MAP_APPFONT ( 6 , 96 ) ; + Size = MAP_APPFONT ( 202 , 12 ) ; + }; + FixedText FT_DESCRIPTION + { + Pos = MAP_APPFONT ( 6 , 111 ) ; + Size = MAP_APPFONT ( 202 , 8 ) ; + Text [ en-US ] = "~Description" ; + }; + + MultiLineEdit EDT_DESCRIPTION + { + Border = TRUE ; + Pos = MAP_APPFONT ( 6 , 122 ) ; + Size = MAP_APPFONT ( 202 , 34 ) ; + TabStop = TRUE ; + IgnoreTab = TRUE; + VScroll = TRUE; + }; + + FixedLine FL_URL + { + Pos = MAP_APPFONT ( 0 , 160 ) ; + Size = MAP_APPFONT ( 214 , 4 ) ; + }; + + // Buttons + HelpButton BTN_HELP1 + { + Pos = MAP_APPFONT ( 6, 168 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + TabStop = TRUE ; + }; + + OKButton BTN_OK1 + { + TabStop = TRUE ; + DefButton = TRUE ; + Pos = MAP_APPFONT ( 107 , 168 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + }; + + CancelButton BTN_CANCEL1 + { + TabStop = TRUE ; + Pos = MAP_APPFONT ( 160 , 168 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + }; +}; diff --git a/svx/source/dialog/cuiimapwnd.cxx b/svx/source/cui/cuiimapwnd.cxx index 283df6f544fd..966fdecace00 100644 --- a/svx/source/dialog/cuiimapwnd.cxx +++ b/svx/source/cui/cuiimapwnd.cxx @@ -39,7 +39,7 @@ #include <vcl/help.hxx> #include <sfx2/sfxsids.hrc> // SID_ATTR_MACROITEM #define _ANIMATION -#include <sfx2/macropg.hxx> +#include "macroass.hxx" #include <svtools/imaprect.hxx> #include <svtools/imapcirc.hxx> #include <svtools/imappoly.hxx> @@ -49,8 +49,8 @@ #include <svx/dialmgr.hxx> #include <svx/dialogs.hrc> #include <svx/svxids.hrc> -#include <imapdlg.hrc> -#include <imapwnd.hxx> +#include <cuiimapdlg.hrc> +#include <cuiimapwnd.hxx> #include <svx/svdpage.hxx> #include <svx/svdorect.hxx> #include <svx/svdocirc.hxx> @@ -63,8 +63,6 @@ #include <sot/formats.hxx> -#include "cuiimapwnd.hxx" //CHINA001 - #define TRANSCOL Color( COL_WHITE ) /************************************************************************* diff --git a/svx/source/dialog/cuiimapwnd.hxx b/svx/source/cui/cuiimapwnd.hxx index 5a9d3b7c18c5..341223a2dc8d 100644 --- a/svx/source/dialog/cuiimapwnd.hxx +++ b/svx/source/cui/cuiimapwnd.hxx @@ -3,9 +3,8 @@ #include <vcl/dialog.hxx> #include <vcl/fixed.hxx> -#ifndef _SV_BUTTON_HXX //autogen +#include <vcl/combobox.hxx> #include <vcl/button.hxx> -#endif #include <vcl/menu.hxx> #include <svtools/itempool.hxx> #include <svtools/imapobj.hxx> diff --git a/svx/source/dialog/cuioptgenrl.hxx b/svx/source/cui/cuioptgenrl.hxx index a19b20c16028..a19b20c16028 100644 --- a/svx/source/dialog/cuioptgenrl.hxx +++ b/svx/source/cui/cuioptgenrl.hxx diff --git a/svx/source/dialog/cuisrchdlg.cxx b/svx/source/cui/cuisrchdlg.cxx index 22eb2d6c7768..efeeffebaf4f 100644 --- a/svx/source/dialog/cuisrchdlg.cxx +++ b/svx/source/cui/cuisrchdlg.cxx @@ -56,14 +56,14 @@ #include <svx/dialogs.hrc> #include <svx/svxitems.hrc> -#include "srchdlg.hrc" +//#include "srchdlg.hrc" #define ITEMID_SETITEM 0 #include <sfx2/srchitem.hxx> #include <svx/pageitem.hxx> -#include "srchctrl.hxx" +//#include "srchctrl.hxx" //CHINA001 #include "srchxtra.hxx" #include <svx/dialmgr.hxx> #include "dlgutil.hxx" diff --git a/svx/source/dialog/cuisrchdlg.hxx b/svx/source/cui/cuisrchdlg.hxx index db701ec95bb1..db701ec95bb1 100644 --- a/svx/source/dialog/cuisrchdlg.hxx +++ b/svx/source/cui/cuisrchdlg.hxx diff --git a/svx/source/dialog/cuitabarea.hxx b/svx/source/cui/cuitabarea.hxx index 2a76e8c07d20..cba81c8c096f 100644 --- a/svx/source/dialog/cuitabarea.hxx +++ b/svx/source/cui/cuitabarea.hxx @@ -32,8 +32,6 @@ // include --------------------------------------------------------------- -#include "svx/svxdllapi.h" - #include <svx/tabarea.hxx> /************************************************************************* @@ -116,7 +114,7 @@ public: |* \************************************************************************/ -class SVX_DLLPUBLIC SvxTransparenceTabPage : public SvxTabPage +class SvxTransparenceTabPage : public SvxTabPage { using TabPage::ActivatePage; using TabPage::DeactivatePage; @@ -205,7 +203,7 @@ public: |* \************************************************************************/ -class SVX_DLLPUBLIC SvxAreaTabPage : public SvxTabPage +class SvxAreaTabPage : public SvxTabPage { using TabPage::ActivatePage; using TabPage::DeactivatePage; diff --git a/svx/source/dialog/cuitabline.hxx b/svx/source/cui/cuitabline.hxx index d82ad9e3d95e..d82ad9e3d95e 100644 --- a/svx/source/dialog/cuitabline.hxx +++ b/svx/source/cui/cuitabline.hxx diff --git a/svx/source/dialog/cuitbxform.cxx b/svx/source/cui/cuitbxform.cxx index 87affa0bc995..87affa0bc995 100644 --- a/svx/source/dialog/cuitbxform.cxx +++ b/svx/source/cui/cuitbxform.cxx diff --git a/svx/source/dialog/cuitbxform.hxx b/svx/source/cui/cuitbxform.hxx index 1587dd7baaf5..1587dd7baaf5 100644 --- a/svx/source/dialog/cuitbxform.hxx +++ b/svx/source/cui/cuitbxform.hxx diff --git a/svx/source/dialog/dbregister.cxx b/svx/source/cui/dbregister.cxx index a1b24691a280..a1b24691a280 100644 --- a/svx/source/dialog/dbregister.cxx +++ b/svx/source/cui/dbregister.cxx diff --git a/svx/source/dialog/dbregister.hrc b/svx/source/cui/dbregister.hrc index f2324aac186c..f2324aac186c 100644 --- a/svx/source/dialog/dbregister.hrc +++ b/svx/source/cui/dbregister.hrc diff --git a/svx/source/dialog/dbregister.hxx b/svx/source/cui/dbregister.hxx index 2e1496a42e1c..2e1496a42e1c 100644 --- a/svx/source/dialog/dbregister.hxx +++ b/svx/source/cui/dbregister.hxx diff --git a/svx/source/dialog/dbregister.src b/svx/source/cui/dbregister.src index bead1ae683cf..bead1ae683cf 100644 --- a/svx/source/dialog/dbregister.src +++ b/svx/source/cui/dbregister.src diff --git a/svx/source/dialog/dbregisterednamesconfig.cxx b/svx/source/cui/dbregisterednamesconfig.cxx index 4f9cf1150422..4f9cf1150422 100644 --- a/svx/source/dialog/dbregisterednamesconfig.cxx +++ b/svx/source/cui/dbregisterednamesconfig.cxx diff --git a/svx/source/dialog/dbregisterednamesconfig.hxx b/svx/source/cui/dbregisterednamesconfig.hxx index 366910c0f193..366910c0f193 100644 --- a/svx/source/dialog/dbregisterednamesconfig.hxx +++ b/svx/source/cui/dbregisterednamesconfig.hxx diff --git a/svx/source/dialog/dbregistersettings.cxx b/svx/source/cui/dbregistersettings.cxx index 45745e3b59cb..45745e3b59cb 100644 --- a/svx/source/dialog/dbregistersettings.cxx +++ b/svx/source/cui/dbregistersettings.cxx diff --git a/svx/source/dialog/dbregistersettings.hxx b/svx/source/cui/dbregistersettings.hxx index ef994e4d0ee2..ef994e4d0ee2 100644 --- a/svx/source/dialog/dbregistersettings.hxx +++ b/svx/source/cui/dbregistersettings.hxx diff --git a/svx/source/dialog/dlgfact.cxx b/svx/source/cui/dlgfact.cxx index c936433e09f4..5fe71d5eb8af 100644 --- a/svx/source/dialog/dlgfact.cxx +++ b/svx/source/cui/dlgfact.cxx @@ -49,7 +49,7 @@ #include <svx/dialogs.hrc> #include "fmresids.hrc" #include "gallery.hrc" -#include "imapdlg.hrc" +//#include "imapdlg.hrc" // dialogs and tabpages #include "dstribut.hxx" #include "cuigaldlg.hxx" @@ -110,6 +110,8 @@ #include "macropg.hxx" // for SvxMacroAssignDlg #include "sdrcelldlg.hxx" #include "newtabledlg.hxx" +#include "macroass.hxx" +#include "acccfg.hxx" using namespace ::com::sun::star; using namespace ::com::sun::star::frame; @@ -119,6 +121,7 @@ using ::com::sun::star::uno::Reference; using namespace svx; // AbstractTabDialog implementations just forwards everything to the dialog +IMPL_ABSTDLG_BASE(AbstractSfxDialog_Impl) IMPL_ABSTDLG_BASE(VclAbstractDialog_Impl) IMPL_ABSTDLG_BASE(VclAbstractRefreshableDialog_Impl); IMPL_ABSTDLG_BASE(AbstractTabDialog_Impl); @@ -143,7 +146,6 @@ IMPL_ABSTDLG_BASE(AbstractScriptSelectorDialog_Impl); IMPL_ABSTDLG_BASE(AbstractGalleryIdDialog_Impl); IMPL_ABSTDLG_BASE(AbstractURLDlg_Impl); IMPL_ABSTDLG_BASE(AbstractSvxHlinkDlgMarkWnd_Impl); -IMPL_ABSTDLG_BASE(AbstractSvxCharacterMap_Impl); IMPL_ABSTDLG_BASE(AbstractSvxSearchSimilarityDialog_Impl); IMPL_ABSTDLG_BASE(AbstractSvxTransformTabDialog_Impl); IMPL_ABSTDLG_BASE(AbstractSvxCaptionDialog_Impl); @@ -163,7 +165,6 @@ IMPL_ABSTDLG_BASE(AbstractSvxHpLinkDlg_Impl); IMPL_ABSTDLG_BASE(AbstractFmSearchDialog_Impl); IMPL_ABSTDLG_BASE(AbstractGraphicFilterDialog_Impl); IMPL_ABSTDLG_BASE(AbstractSvxAreaTabDialog_Impl); -IMPL_ABSTDLG_BASE(AbstractSfxSingleTabDialog_Impl); IMPL_ABSTDLG_BASE(AbstractPasteDialog_Impl); IMPL_ABSTDLG_BASE(AbstractInsertObjectDialog_Impl); IMPL_ABSTDLG_BASE(AbstractLinksDialog_Impl); @@ -240,6 +241,21 @@ String AbstractTabDialog_Impl::GetText() const // AbstractTabDialog_Impl end +const SfxItemSet* AbstractSfxDialog_Impl::GetOutputItemSet() const +{ + return pDlg->GetOutputItemSet(); +} + +void AbstractSfxDialog_Impl::SetText( const XubString& rStr ) +{ + pDlg->SetText( rStr ); +} + +String AbstractSfxDialog_Impl::GetText() const +{ + return pDlg->GetText(); +} + //for SvxDistributeDialog begin SvxDistributeHorizontal AbstractSvxDistributeDialog_Impl::GetDistributeHor()const { @@ -632,51 +648,6 @@ USHORT AbstractSvxHlinkDlgMarkWnd_Impl::SetError( USHORT nError) // AbstractSvxHlinkDlgMarkWnd_Impl end -// AbstractSvxCharacterMap_Impl begin -void AbstractSvxCharacterMap_Impl::SetText( const XubString& rStr ) -{ - pDlg->SetText( rStr ); -} - -void AbstractSvxCharacterMap_Impl::DisableFontSelection() -{ - pDlg->DisableFontSelection(); -} - -const Font& AbstractSvxCharacterMap_Impl::GetCharFont() const -{ - return pDlg->GetCharFont(); -} - -void AbstractSvxCharacterMap_Impl::SetCharFont( const Font& rFont ) -{ - pDlg->SetCharFont( rFont ); -} - -void AbstractSvxCharacterMap_Impl::SetFont( const Font& rFont ) -{ - pDlg->SetFont( rFont ); -} - -void AbstractSvxCharacterMap_Impl::SetChar( sal_Unicode c ) -{ - pDlg->SetChar( c ); -} - -sal_Unicode AbstractSvxCharacterMap_Impl::GetChar() const -{ - sal_UCS4 cUCS4 = pDlg->GetChar(); - // TODO: change return value to UCS4 - return static_cast<sal_Unicode>(cUCS4); -} - -String AbstractSvxCharacterMap_Impl::GetCharacters() const -{ - return pDlg->GetCharacters(); -} - -// AbstractSvxCharacterMap_Impl end - //for SvxSearchSimilarityDialog begin USHORT AbstractSvxSearchSimilarityDialog_Impl::GetOther() { @@ -1016,13 +987,6 @@ void AbstractSvxAreaTabDialog_Impl::DontDeleteColorTable() } // AbstractSvxAreaTabDialog_Impl end -// add SvxMeasureDialog & SvxConnectionDialog begin -const SfxItemSet* AbstractSfxSingleTabDialog_Impl::GetOutputItemSet() const -{ - return pDlg->GetOutputItemSet(); -} -// SvxMeasureDialog & SvxConnectionDialog end - // add SvxPostItDialog begin void AbstractSvxPostItDialog_Impl::SetText( const XubString& rStr ) { @@ -1518,22 +1482,10 @@ VclAbstractDialog2 * AbstractDialogFactory_Impl::CreateGalleryThemePropertiesDia AbstractURLDlg * AbstractDialogFactory_Impl::CreateURLDialog( Window* pParent, //add for URLDlg const String& rURL, const String& rAltText, const String& rDescription, const String& rTarget, const String& rName, - TargetList& rTargetList, - sal_uInt32 nResId) + TargetList& rTargetList ) { - URLDlg* pDlg=NULL; - switch ( nResId ) - { - case RID_SVXDLG_IMAPURL : - pDlg = new URLDlg( pParent, rURL, rAltText, rDescription, rTarget, rName, rTargetList); - break; - default: - break; - } - - if ( pDlg ) - return new AbstractURLDlg_Impl( pDlg ); - return 0; + URLDlg* pDlg = new URLDlg( pParent, rURL, rAltText, rDescription, rTarget, rName, rTargetList); + return new AbstractURLDlg_Impl( pDlg ); } //CHINA001 URLDlg end @@ -1556,23 +1508,23 @@ AbstractSvxHlinkDlgMarkWnd* AbstractDialogFactory_Impl::CreateSvxHlinkDlgMarkWnd } //CHINA001 SvxHlinkDlgMarkWnd end -//CHINA001 SvxCharacterMap begin -AbstractSvxCharacterMap * AbstractDialogFactory_Impl::CreateSvxCharacterMap( Window* pParent, //add for SvxCharacterMap - sal_uInt32 nResId, - BOOL bOne ) +SfxAbstractDialog* AbstractDialogFactory_Impl::CreateSfxDialog( sal_uInt32 nResId, + Window* pParent, + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& , + const SfxItemSet* pAttrSet ) { - SvxCharacterMap* pDlg=NULL; + SfxModalDialog* pDlg=NULL; switch ( nResId ) { case RID_SVXDLG_CHARMAP : - pDlg = new SvxCharacterMap( pParent,bOne ); + pDlg = new SvxCharacterMap( pParent, TRUE, pAttrSet ); break; default: break; } if ( pDlg ) - return new AbstractSvxCharacterMap_Impl( pDlg ); + return new AbstractSfxDialog_Impl( pDlg ); return 0; } //CHINA001 SvxCharacterMap end @@ -2074,8 +2026,35 @@ SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateSvxLineTabDialog( Window } //CHINA001 SvxLineTabDialog end +SfxAbstractDialog* AbstractDialogFactory_Impl::CreateSfxDialog( Window* pParent, + const SfxItemSet& rAttr, + const Reference< XFrame >& _rxDocumentFrame, + sal_uInt32 nResId + ) +{ + SfxModalDialog* pDlg=NULL; + switch ( nResId ) + { + case SID_EVENTCONFIG : + pDlg = new SfxMacroAssignDlg( pParent, _rxDocumentFrame, rAttr ); + break; + case RID_SVXPAGE_MACROASSIGN : + pDlg = new SvxShortcutAssignDlg( pParent, _rxDocumentFrame, rAttr ); + break; + case RID_SVXDLG_CHARMAP : + pDlg = new SvxCharacterMap( pParent, TRUE, &rAttr ); + break; + default: + break; + } + + if ( pDlg ) + return new AbstractSfxDialog_Impl( pDlg ); + return 0; +} + //CHINA001 SvxMeasureDialog & SvxConnectionDialog begin -AbstractSfxSingleTabDialog* AbstractDialogFactory_Impl::CreateSfxSingleTabDialog( Window* pParent, +SfxAbstractDialog* AbstractDialogFactory_Impl::CreateSfxDialog( Window* pParent, const SfxItemSet& rAttr, const SdrView* pView, sal_uInt32 nResId @@ -2106,7 +2085,7 @@ AbstractSfxSingleTabDialog* AbstractDialogFactory_Impl::CreateSfxSingleTabDialog } if ( pDlg ) - return new AbstractSfxSingleTabDialog_Impl( pDlg ); + return new AbstractSfxDialog_Impl( pDlg ); return 0; } @@ -2143,20 +2122,23 @@ public: m_pDialog.reset( new SvxMacroAssignDlg( _pParent, _rxDocumentFrame, m_aItems, _rxEvents, _nInitiallySelectedEvent ) ); } - virtual short Execute() - { - return m_pDialog->Execute(); - } - - virtual ~SvxMacroAssignDialog() - { - } + virtual short Execute(); + virtual ~SvxMacroAssignDialog(); private: SfxItemSet m_aItems; ::std::auto_ptr< SvxMacroAssignDlg > m_pDialog; }; +short SvxMacroAssignDialog::Execute() +{ + return m_pDialog->Execute(); +} + +SvxMacroAssignDialog::~SvxMacroAssignDialog() +{ +} + VclAbstractDialog * AbstractDialogFactory_Impl::CreateSvxMacroAssignDlg( Window* _pParent, const Reference< XFrame >& _rxDocumentFrame, const bool _bUnoDialogMode, const Reference< XNameReplace >& _rxEvents, const sal_uInt16 _nInitiallySelectedEvent ) @@ -2237,7 +2219,8 @@ CreateTabPage AbstractDialogFactory_Impl::GetTabPageCreatorFunc( USHORT nId ) return SvxPageDescPage::Create; case RID_SVXPAGE_GRFCROP : return SvxGrfCropPage::Create; - + case RID_SVXPAGE_MACROASSIGN : + return SfxMacroTabPage::Create; default: break; } diff --git a/svx/source/dialog/dlgfact.hxx b/svx/source/cui/dlgfact.hxx index afe55c740c69..e6c1325b4b38 100644 --- a/svx/source/dialog/dlgfact.hxx +++ b/svx/source/cui/dlgfact.hxx @@ -45,6 +45,7 @@ //#include "srchxtra.hxx" class SfxTabDialog; +class SfxModalDialog; class Dialog; class SfxItemPool; class FmShowColsDialog; @@ -127,6 +128,16 @@ class VclAbstractRefreshableDialog_Impl : public VclAbstractRefreshableDialog }; //for ActualizeProgress end +class AbstractSfxDialog_Impl : public SfxAbstractDialog +{ + DECL_ABSTDLG_BASE(AbstractSfxDialog_Impl,SfxModalDialog) + virtual const SfxItemSet* GetOutputItemSet() const; + + //From class Window. + virtual void SetText( const XubString& rStr ); + virtual String GetText() const ; +}; + class AbstractTabDialog_Impl : public SfxAbstractTabDialog { DECL_ABSTDLG_BASE(AbstractTabDialog_Impl,SfxTabDialog) @@ -326,26 +337,6 @@ class AbstractSvxHlinkDlgMarkWnd_Impl : public AbstractSvxHlinkDlgMarkWnd }; //for SvxHlinkDlgMarkWnd end -//for SvxCharacterMap begin -class SvxCharacterMap; -class AbstractSvxCharacterMap_Impl :public AbstractSvxCharacterMap -{ - DECL_ABSTDLG_BASE(AbstractSvxCharacterMap_Impl,SvxCharacterMap) - virtual void SetText( const XubString& rStr ); //From Class Window - virtual void DisableFontSelection(); - - virtual const Font& GetCharFont() const ; - virtual void SetCharFont( const Font& rFont ); - virtual void SetFont( const Font& rFont ) ; - - // TODO: change to UCS4 - virtual void SetChar( sal_Unicode ); - virtual sal_Unicode GetChar() const; - - virtual String GetCharacters() const; -}; -//for SvxCharacterMap end - //for SvxSearchSimilarityDialog begin class SvxSearchSimilarityDialog; class AbstractSvxSearchSimilarityDialog_Impl :public AbstractSvxSearchSimilarityDialog @@ -539,16 +530,6 @@ class AbstractSvxAreaTabDialog_Impl :public AbstractSvxAreaTabDialog }; //add for SvxAreaTabDialog end -//add for SvxMeasureDialog & SvxConnectionDialog begin -class SfxSingleTabDialog; -class AbstractSfxSingleTabDialog_Impl :public AbstractSfxSingleTabDialog -{ - DECL_ABSTDLG_BASE(AbstractSfxSingleTabDialog_Impl,SfxSingleTabDialog) - virtual const SfxItemSet* GetOutputItemSet() const; - -}; -//add for SvxMeasureDialog & SvxConnectionDialog end - class AbstractInsertObjectDialog_Impl : public SfxAbstractInsertObjectDialog { DECL_ABSTDLG_BASE(AbstractInsertObjectDialog_Impl, InsertObjectDialog_Impl) @@ -609,6 +590,19 @@ class AbstractDialogFactory_Impl : public SvxAbstractDialogFactory public: virtual VclAbstractDialog* CreateVclDialog( Window* pParent, sal_uInt32 nResId ); virtual VclAbstractDialog* CreateSfxDialog( Window* pParent, const SfxBindings& rBindings, sal_uInt32 nResId ); + virtual SfxAbstractDialog* CreateSfxDialog( sal_uInt32 nResId, + Window* pParent, + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xViewFrame, + const SfxItemSet* pAttrSet=0 ); + virtual SfxAbstractDialog* CreateSfxDialog( Window* pParent, + const SfxItemSet& rAttr, + const SdrView* pView, + sal_uInt32 nResId ); + virtual SfxAbstractDialog* CreateSfxDialog( Window* pParent, //add for SvxMeasureDialog & SvxConnectionDialog + const SfxItemSet& rAttr, + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxFrame, + sal_uInt32 nResId + ); virtual VclAbstractDialog* CreateFrameDialog( Window* pParent, const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rxFrame, sal_uInt32 nResId, const String& rParameter ); virtual SfxAbstractTabDialog* CreateTabDialog( sal_uInt32 nResId, Window* pParent, @@ -702,13 +696,9 @@ public: virtual AbstractURLDlg * CreateURLDialog( Window* pParent, //add for URLDlg const String& rURL, const String& rAltText, const String& rDescription, const String& rTarget, const String& rName, - TargetList& rTargetList, - sal_uInt32 nResId); + TargetList& rTargetList ); virtual AbstractSvxHlinkDlgMarkWnd* CreateSvxHlinkDlgMarkWndDialog( SvxHyperlinkTabPageBase* pParent, sal_uInt32 nResId ); //add for SvxHlinkDlgMarkWnd - virtual AbstractSvxCharacterMap * CreateSvxCharacterMap( Window* pParent, - sal_uInt32 nResId, - BOOL bOne = TRUE ) ; //add for SvxCharacterMap virtual VclAbstractDialog* CreateSvxSearchAttributeDialog( Window* pParent, SearchAttrItemList& rLst, const USHORT* pWhRanges, @@ -780,11 +770,6 @@ public: sal_uInt32 nResId, const SdrObject* pObj = NULL, BOOL bHasObj = TRUE ); - virtual AbstractSfxSingleTabDialog* CreateSfxSingleTabDialog( Window* pParent, //add for SvxMeasureDialog & SvxConnectionDialog - const SfxItemSet& rAttr, - const SdrView* pView, - sal_uInt32 nResId - ); virtual AbstractSvxPostItDialog* CreateSvxPostItDialog( Window* pParent, //add for SvxPostItDialog const SfxItemSet& rCoreSet, sal_uInt32 nResId, diff --git a/svx/source/dialog/dlgname.cxx b/svx/source/cui/dlgname.cxx index 4b50dcbc6dfa..4b50dcbc6dfa 100644 --- a/svx/source/dialog/dlgname.cxx +++ b/svx/source/cui/dlgname.cxx diff --git a/svx/source/dialog/dlgname.hrc b/svx/source/cui/dlgname.hrc index 787a5b9bd6df..787a5b9bd6df 100644 --- a/svx/source/dialog/dlgname.hrc +++ b/svx/source/cui/dlgname.hrc diff --git a/svx/source/dialog/dlgname.hxx b/svx/source/cui/dlgname.hxx index ee78927e8931..ee78927e8931 100644 --- a/svx/source/dialog/dlgname.hxx +++ b/svx/source/cui/dlgname.hxx diff --git a/svx/source/dialog/dlgname.src b/svx/source/cui/dlgname.src index 5647bb347e69..5647bb347e69 100644 --- a/svx/source/dialog/dlgname.src +++ b/svx/source/cui/dlgname.src diff --git a/svx/source/dialog/doclinkdialog.cxx b/svx/source/cui/doclinkdialog.cxx index aec98ea74aba..aec98ea74aba 100644 --- a/svx/source/dialog/doclinkdialog.cxx +++ b/svx/source/cui/doclinkdialog.cxx diff --git a/svx/source/dialog/doclinkdialog.hrc b/svx/source/cui/doclinkdialog.hrc index 022c43b6d620..022c43b6d620 100644 --- a/svx/source/dialog/doclinkdialog.hrc +++ b/svx/source/cui/doclinkdialog.hrc diff --git a/svx/source/dialog/doclinkdialog.hxx b/svx/source/cui/doclinkdialog.hxx index 81ec0c34d0c5..81ec0c34d0c5 100644 --- a/svx/source/dialog/doclinkdialog.hxx +++ b/svx/source/cui/doclinkdialog.hxx diff --git a/svx/source/dialog/doclinkdialog.src b/svx/source/cui/doclinkdialog.src index e4c8ceb3de87..e4c8ceb3de87 100644 --- a/svx/source/dialog/doclinkdialog.src +++ b/svx/source/cui/doclinkdialog.src diff --git a/svx/source/dialog/dstribut.cxx b/svx/source/cui/dstribut.cxx index 7ac9e82741b4..7ac9e82741b4 100644 --- a/svx/source/dialog/dstribut.cxx +++ b/svx/source/cui/dstribut.cxx diff --git a/svx/source/dialog/dstribut.hrc b/svx/source/cui/dstribut.hrc index 0834c8640785..0834c8640785 100644 --- a/svx/source/dialog/dstribut.hrc +++ b/svx/source/cui/dstribut.hrc diff --git a/svx/source/dialog/dstribut.hxx b/svx/source/cui/dstribut.hxx index 46d6a78115c1..46d6a78115c1 100644 --- a/svx/source/dialog/dstribut.hxx +++ b/svx/source/cui/dstribut.hxx diff --git a/svx/source/dialog/dstribut.src b/svx/source/cui/dstribut.src index e9e0ede56590..e9e0ede56590 100644 --- a/svx/source/dialog/dstribut.src +++ b/svx/source/cui/dstribut.src diff --git a/svx/source/dialog/eventdlg.cxx b/svx/source/cui/eventdlg.cxx index dd9e2511b1ea..dd9e2511b1ea 100644 --- a/svx/source/dialog/eventdlg.cxx +++ b/svx/source/cui/eventdlg.cxx diff --git a/svx/source/dialog/eventdlg.hrc b/svx/source/cui/eventdlg.hrc index 245ff183313e..245ff183313e 100644 --- a/svx/source/dialog/eventdlg.hrc +++ b/svx/source/cui/eventdlg.hrc diff --git a/svx/source/dialog/eventdlg.src b/svx/source/cui/eventdlg.src index 8c16b8f45d56..8c16b8f45d56 100644 --- a/svx/source/dialog/eventdlg.src +++ b/svx/source/cui/eventdlg.src diff --git a/svx/source/dialog/fontsubs.cxx b/svx/source/cui/fontsubs.cxx index a8fcc5618af4..9e957ffbb43b 100644 --- a/svx/source/dialog/fontsubs.cxx +++ b/svx/source/cui/fontsubs.cxx @@ -31,6 +31,10 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" +#ifdef SVX_DLLIMPLEMENTATION +#undef SVX_DLLIMPLEMENTATION +#endif + #ifdef PRECOMPILED #include "svxpch.hxx" #endif diff --git a/svx/source/dialog/fontsubs.hrc b/svx/source/cui/fontsubs.hrc index 9344d41c0fc7..9344d41c0fc7 100644 --- a/svx/source/dialog/fontsubs.hrc +++ b/svx/source/cui/fontsubs.hrc diff --git a/svx/source/dialog/fontsubs.hxx b/svx/source/cui/fontsubs.hxx index c6eb2ae84f61..8032136bdc3d 100644 --- a/svx/source/dialog/fontsubs.hxx +++ b/svx/source/cui/fontsubs.hxx @@ -35,7 +35,6 @@ #include <svx/simptabl.hxx> #include <vcl/toolbox.hxx> #include <svtools/ctrlbox.hxx> -#include "svx/svxdllapi.h" // class SvxFontSubstCheckListBox ------------------------------------------ @@ -68,7 +67,7 @@ class SvxFontSubstCheckListBox : public SvxSimpleTable // class SvxFontSubstTabPage ---------------------------------------------------- class SvtFontSubstConfig; namespace svt {class SourceViewConfig;} -class SVX_DLLPUBLIC SvxFontSubstTabPage : public SfxTabPage +class SvxFontSubstTabPage : public SfxTabPage { CheckBox aUseTableCB; FixedText aFont1FT; diff --git a/svx/source/dialog/fontsubs.src b/svx/source/cui/fontsubs.src index f3160d2f4808..f3160d2f4808 100644 --- a/svx/source/dialog/fontsubs.src +++ b/svx/source/cui/fontsubs.src diff --git a/svx/source/dialog/grfflt.hrc b/svx/source/cui/grfflt.hrc index b04d025d4d13..b04d025d4d13 100644 --- a/svx/source/dialog/grfflt.hrc +++ b/svx/source/cui/grfflt.hrc diff --git a/svx/source/dialog/grfflt.src b/svx/source/cui/grfflt.src index ba1398d98b59..ba1398d98b59 100644 --- a/svx/source/dialog/grfflt.src +++ b/svx/source/cui/grfflt.src diff --git a/svx/source/dialog/grfpage.cxx b/svx/source/cui/grfpage.cxx index c80d7b0d2b87..c80d7b0d2b87 100644 --- a/svx/source/dialog/grfpage.cxx +++ b/svx/source/cui/grfpage.cxx diff --git a/svx/source/dialog/grfpage.hrc b/svx/source/cui/grfpage.hrc index 5743645f3eb0..5743645f3eb0 100644 --- a/svx/source/dialog/grfpage.hrc +++ b/svx/source/cui/grfpage.hrc diff --git a/svx/source/dialog/grfpage.hxx b/svx/source/cui/grfpage.hxx index 58ce4e5a5e63..58ce4e5a5e63 100644 --- a/svx/source/dialog/grfpage.hxx +++ b/svx/source/cui/grfpage.hxx diff --git a/svx/source/dialog/grfpage.src b/svx/source/cui/grfpage.src index 0d6791fd917d..0d6791fd917d 100644 --- a/svx/source/dialog/grfpage.src +++ b/svx/source/cui/grfpage.src diff --git a/svx/source/dialog/hangulhanjadlg.cxx b/svx/source/cui/hangulhanjadlg.cxx index 0d0c9348634f..0d0c9348634f 100644 --- a/svx/source/dialog/hangulhanjadlg.cxx +++ b/svx/source/cui/hangulhanjadlg.cxx diff --git a/svx/source/dialog/hangulhanjadlg.hrc b/svx/source/cui/hangulhanjadlg.hrc index 882d12a4c997..882d12a4c997 100644 --- a/svx/source/dialog/hangulhanjadlg.hrc +++ b/svx/source/cui/hangulhanjadlg.hrc diff --git a/svx/source/dialog/hangulhanjadlg.hxx b/svx/source/cui/hangulhanjadlg.hxx index 7d637bed048d..7d637bed048d 100644 --- a/svx/source/dialog/hangulhanjadlg.hxx +++ b/svx/source/cui/hangulhanjadlg.hxx diff --git a/svx/source/dialog/hangulhanjadlg.src b/svx/source/cui/hangulhanjadlg.src index 91439e285f7d..91439e285f7d 100644 --- a/svx/source/dialog/hangulhanjadlg.src +++ b/svx/source/cui/hangulhanjadlg.src diff --git a/svx/source/inc/headertablistbox.hxx b/svx/source/cui/headertablistbox.hxx index 8738327b70bc..8738327b70bc 100644..100755 --- a/svx/source/inc/headertablistbox.hxx +++ b/svx/source/cui/headertablistbox.hxx diff --git a/svx/source/dialog/hldocntp.cxx b/svx/source/cui/hldocntp.cxx index 8ecaf7429edd..8ecaf7429edd 100644 --- a/svx/source/dialog/hldocntp.cxx +++ b/svx/source/cui/hldocntp.cxx diff --git a/svx/source/dialog/hldocntp.hxx b/svx/source/cui/hldocntp.hxx index c9f220c0df6f..c9f220c0df6f 100644 --- a/svx/source/dialog/hldocntp.hxx +++ b/svx/source/cui/hldocntp.hxx diff --git a/svx/source/dialog/hldoctp.cxx b/svx/source/cui/hldoctp.cxx index 34d8ea450e2a..34d8ea450e2a 100644 --- a/svx/source/dialog/hldoctp.cxx +++ b/svx/source/cui/hldoctp.cxx diff --git a/svx/source/dialog/hldoctp.hxx b/svx/source/cui/hldoctp.hxx index 1e3dae701e7b..1e3dae701e7b 100644 --- a/svx/source/dialog/hldoctp.hxx +++ b/svx/source/cui/hldoctp.hxx diff --git a/svx/source/dialog/hlinettp.cxx b/svx/source/cui/hlinettp.cxx index 218cc73d8a82..218cc73d8a82 100644 --- a/svx/source/dialog/hlinettp.cxx +++ b/svx/source/cui/hlinettp.cxx diff --git a/svx/source/dialog/hlinettp.hxx b/svx/source/cui/hlinettp.hxx index 04fe1fb6f7a6..04fe1fb6f7a6 100644 --- a/svx/source/dialog/hlinettp.hxx +++ b/svx/source/cui/hlinettp.hxx diff --git a/svx/source/dialog/hlmailtp.cxx b/svx/source/cui/hlmailtp.cxx index 982e79c9d921..982e79c9d921 100644 --- a/svx/source/dialog/hlmailtp.cxx +++ b/svx/source/cui/hlmailtp.cxx diff --git a/svx/source/dialog/hlmailtp.hxx b/svx/source/cui/hlmailtp.hxx index 797695b09e00..797695b09e00 100644 --- a/svx/source/dialog/hlmailtp.hxx +++ b/svx/source/cui/hlmailtp.hxx diff --git a/svx/source/dialog/hlmarkwn.cxx b/svx/source/cui/hlmarkwn.cxx index 86dc32c6d720..86dc32c6d720 100644 --- a/svx/source/dialog/hlmarkwn.cxx +++ b/svx/source/cui/hlmarkwn.cxx diff --git a/svx/source/dialog/hlmarkwn.src b/svx/source/cui/hlmarkwn.src index 4618ee6c9549..4618ee6c9549 100644 --- a/svx/source/dialog/hlmarkwn.src +++ b/svx/source/cui/hlmarkwn.src diff --git a/svx/source/dialog/hltpbase.cxx b/svx/source/cui/hltpbase.cxx index 5c758928d734..b727602255f7 100644 --- a/svx/source/dialog/hltpbase.cxx +++ b/svx/source/cui/hltpbase.cxx @@ -47,6 +47,7 @@ //CHINA001 #endif #include "cuihyperdlg.hxx" //CHINA001 #include "hltpbase.hxx" +#include "macroass.hxx" #include <svx/svxdlg.hxx> //CHINA001 #include <svx/dialogs.hrc> //CHINA001 diff --git a/svx/source/dialog/hltpbase.hxx b/svx/source/cui/hltpbase.hxx index a92b7bd68397..71bb37eade02 100644 --- a/svx/source/dialog/hltpbase.hxx +++ b/svx/source/cui/hltpbase.hxx @@ -47,7 +47,6 @@ #include <svtools/eitem.hxx> #include <svtools/transfer.hxx> #include <sfx2/dispatch.hxx> -#include <sfx2/macropg.hxx> #include <vcl/msgbox.hxx> #include <sfx2/fcontnr.hxx> #include <svtools/inettbc.hxx> diff --git a/svx/source/dialog/iconcdlg.cxx b/svx/source/cui/iconcdlg.cxx index 5099fdce6af2..5099fdce6af2 100644 --- a/svx/source/dialog/iconcdlg.cxx +++ b/svx/source/cui/iconcdlg.cxx diff --git a/svx/source/dialog/iconcdlg.hxx b/svx/source/cui/iconcdlg.hxx index 771080a5aaac..771080a5aaac 100644 --- a/svx/source/dialog/iconcdlg.hxx +++ b/svx/source/cui/iconcdlg.hxx diff --git a/svx/source/dialog/iconcdlg.src b/svx/source/cui/iconcdlg.src index 1594eb43a8c7..1594eb43a8c7 100644 --- a/svx/source/dialog/iconcdlg.src +++ b/svx/source/cui/iconcdlg.src diff --git a/svx/source/init/init.cxx b/svx/source/cui/init.cxx index d215fbc593d9..686b5b068498 100644 --- a/svx/source/init/init.cxx +++ b/svx/source/cui/init.cxx @@ -31,36 +31,30 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#include <svx/svxdlg.hxx> -#include <svx/dialogs.hrc> +#ifdef SVX_DLLIMPLEMENTATION +#undef SVX_DLLIMPLEMENTATION +#endif -#include "vos/mutex.hxx" -#include <vcl/edit.hxx> -#include <vcl/svapp.hxx> -#include <vcl/dialog.hxx> #include <vcl/msgbox.hxx> +#include "cuicharmap.hxx" // ------------------------------------------------------------------------ // hook to call special character dialog for edits // caution: needs C-Linkage since dynamically loaded via symbol name extern "C" { -SVX_DLLPUBLIC bool GetSpecialCharsForEdit(Window* i_pParent, const Font& i_rFont, String& o_rResult) +bool GetSpecialCharsForEdit(Window* i_pParent, const Font& i_rFont, String& o_rResult) { bool bRet = false; - SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - if(pFact) + SvxCharacterMap* aDlg = new SvxCharacterMap( i_pParent ); + aDlg->DisableFontSelection(); + aDlg->SetCharFont(i_rFont); + if ( aDlg->Execute() == RET_OK ) { - AbstractSvxCharacterMap* aDlg = pFact->CreateSvxCharacterMap( i_pParent, RID_SVXDLG_CHARMAP ); - aDlg->DisableFontSelection(); - aDlg->SetCharFont(i_rFont); - if ( aDlg->Execute() == RET_OK ) - { - o_rResult = aDlg->GetChar(); - bRet = true; - } - delete aDlg; + o_rResult = aDlg->GetCharacters(); + bRet = true; } + delete aDlg; return bRet; } } diff --git a/svx/source/dialog/insdlg.cxx b/svx/source/cui/insdlg.cxx index d53c300c79c7..d53c300c79c7 100644 --- a/svx/source/dialog/insdlg.cxx +++ b/svx/source/cui/insdlg.cxx diff --git a/svx/source/dialog/insdlg.hxx b/svx/source/cui/insdlg.hxx index 1924b5ca8c7a..1924b5ca8c7a 100644 --- a/svx/source/dialog/insdlg.hxx +++ b/svx/source/cui/insdlg.hxx diff --git a/svx/source/dialog/internationaloptions.cxx b/svx/source/cui/internationaloptions.cxx index 43efb498048a..43efb498048a 100644 --- a/svx/source/dialog/internationaloptions.cxx +++ b/svx/source/cui/internationaloptions.cxx diff --git a/svx/source/dialog/internationaloptions.hrc b/svx/source/cui/internationaloptions.hrc index b367340ba2fe..b367340ba2fe 100644 --- a/svx/source/dialog/internationaloptions.hrc +++ b/svx/source/cui/internationaloptions.hrc diff --git a/svx/source/dialog/internationaloptions.hxx b/svx/source/cui/internationaloptions.hxx index d17625ee380e..d17625ee380e 100644 --- a/svx/source/dialog/internationaloptions.hxx +++ b/svx/source/cui/internationaloptions.hxx diff --git a/svx/source/dialog/internationaloptions.src b/svx/source/cui/internationaloptions.src index ab725d9c4f0b..ab725d9c4f0b 100644 --- a/svx/source/dialog/internationaloptions.src +++ b/svx/source/cui/internationaloptions.src diff --git a/svx/source/dialog/labdlg.cxx b/svx/source/cui/labdlg.cxx index 02a3bd158c79..02a3bd158c79 100644 --- a/svx/source/dialog/labdlg.cxx +++ b/svx/source/cui/labdlg.cxx diff --git a/svx/source/dialog/labdlg.hrc b/svx/source/cui/labdlg.hrc index 82ea64c1620c..82ea64c1620c 100644 --- a/svx/source/dialog/labdlg.hrc +++ b/svx/source/cui/labdlg.hrc diff --git a/svx/source/dialog/labdlg.hxx b/svx/source/cui/labdlg.hxx index 9581fbf9ba78..9581fbf9ba78 100644 --- a/svx/source/dialog/labdlg.hxx +++ b/svx/source/cui/labdlg.hxx diff --git a/svx/source/dialog/labdlg.src b/svx/source/cui/labdlg.src index f3d464a1558e..f3d464a1558e 100644 --- a/svx/source/dialog/labdlg.src +++ b/svx/source/cui/labdlg.src diff --git a/svx/source/dialog/linkdlg.cxx b/svx/source/cui/linkdlg.cxx index b2e00cf48c0b..b2e00cf48c0b 100644 --- a/svx/source/dialog/linkdlg.cxx +++ b/svx/source/cui/linkdlg.cxx diff --git a/svx/source/dialog/linkdlg.hxx b/svx/source/cui/linkdlg.hxx index 4703079c9420..4703079c9420 100644 --- a/svx/source/dialog/linkdlg.hxx +++ b/svx/source/cui/linkdlg.hxx diff --git a/svx/source/cui/macroass.cxx b/svx/source/cui/macroass.cxx new file mode 100644 index 000000000000..ac4eeffd6a68 --- /dev/null +++ b/svx/source/cui/macroass.cxx @@ -0,0 +1,719 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: macropg.cxx,v $ + * $Revision: 1.21 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_svx.hxx" + +#define ITEMID_MACRO 0 +#include <svtools/macitem.hxx> +#undef ITEMID_MACRO + +#include "macroass.hxx" + +#include <basic/basmgr.hxx> +#include <svx/dialmgr.hxx> + +#define _SVSTDARR_STRINGSDTOR +#include <svtools/svstdarr.hxx> + +#include <svtools/svmedit.hxx> +#include "cfgutil.hxx" +#include <sfx2/app.hxx> +#include <sfx2/objsh.hxx> +#include "macroass.hrc" +#include "svx/dialogs.hrc" +#include <sfx2/macrconf.hxx> +#include "headertablistbox.hxx" + +using ::com::sun::star::uno::Reference; +using ::com::sun::star::frame::XFrame; + +class _SfxMacroTabPage_Impl +{ +public: + _SfxMacroTabPage_Impl( void ); + ~_SfxMacroTabPage_Impl(); + + String maStaticMacroLBLabel; + PushButton* pAssignPB; + PushButton* pDeletePB; + String* pStrEvent; + String* pAssignedMacro; + ListBox* pScriptTypeLB; + _HeaderTabListBox* pEventLB; + SfxConfigGroupListBox_Impl* pGroupLB; + FixedText* pFT_MacroLBLabel; + SfxConfigFunctionListBox_Impl* pMacroLB; + + FixedText* pMacroFT; + String* pMacroStr; + FNGetRangeHdl fnGetRange; + FNGetMacrosOfRangeHdl fnGetMacroOfRange; + + BOOL bReadOnly; + Timer maFillGroupTimer; + BOOL bGotEvents; +}; + +_SfxMacroTabPage_Impl::_SfxMacroTabPage_Impl( void ) : + pAssignPB( NULL ), + pDeletePB( NULL ), + pStrEvent( NULL ), + pAssignedMacro( NULL ), + pScriptTypeLB( NULL ), + pEventLB( NULL ), + pGroupLB( NULL ), + pFT_MacroLBLabel( NULL ), + pMacroLB( NULL ), + pMacroFT( NULL ), + pMacroStr( NULL ), + fnGetRange( NULL ), + fnGetMacroOfRange( NULL ), + bReadOnly( FALSE ), + bGotEvents( FALSE ) +{ +} + +_SfxMacroTabPage_Impl::~_SfxMacroTabPage_Impl() +{ + delete pAssignPB; + delete pDeletePB; + delete pStrEvent; + delete pAssignedMacro; + delete pScriptTypeLB; + delete pEventLB; + delete pGroupLB; + delete pMacroLB; + delete pFT_MacroLBLabel; + delete pMacroFT; + delete pMacroStr; +} + + +SvStringsDtor* _ImpGetRangeHdl( _SfxMacroTabPage*, const String& rLanguage ); +SvStringsDtor* _ImpGetMacrosOfRangeHdl( _SfxMacroTabPage*, const String& rLanguage, const String& rRange ); + +static USHORT __FAR_DATA aPageRg[] = { + SID_ATTR_MACROITEM, SID_ATTR_MACROITEM, + 0 +}; + +// Achtung im Code wird dieses Array direkt (0, 1, ...) indiziert +static long nTabs[] = + { + 2, // Number of Tabs + 0, 90 + }; + +#define TAB_WIDTH_MIN 10 + +// IDs for items in HeaderBar of EventLB +#define ITEMID_EVENT 1 +#define ITMEID_ASSMACRO 2 + + +#define LB_EVENTS_ITEMPOS 1 +#define LB_MACROS_ITEMPOS 2 + +String ConvertToUIName_Impl( SvxMacro *pMacro, const String& /*rLanguage*/ ) +{ + String aName( pMacro->GetMacName() ); + String aEntry; + if ( ! pMacro->GetLanguage().EqualsAscii("JavaScript") ) + { + USHORT nCount = aName.GetTokenCount('.'); + aEntry = aName.GetToken( nCount-1, '.' ); + if ( nCount > 2 ) + { + aEntry += '('; + aEntry += aName.GetToken( 0, '.' ); + aEntry += '.'; + aEntry += aName.GetToken( nCount-2, '.' ); + aEntry += ')'; + } + return aEntry; + } + else + return aName; +} + +void _SfxMacroTabPage::EnableButtons( const String& rLangName ) +{ + // Solange die Eventbox leer ist, nichts tun + const SvLBoxEntry* pE = mpImpl->pEventLB->GetListBox().FirstSelected(); + if ( pE ) + { + // Gebundenes Macro holen + const SvxMacro* pM = aTbl.Get( (USHORT)(ULONG) pE->GetUserData() ); + mpImpl->pDeletePB->Enable( 0 != pM && !mpImpl->bReadOnly ); + + // Bei gleichem ScriptType Zuweisung nur, wenn Macro sich + // ge"andert hat; bei verschiedenem ScriptType, wenn Script nicht leer + String sEventMacro; + sEventMacro = ((SvLBoxString*)pE->GetItem( LB_MACROS_ITEMPOS ))->GetText(); + if ( rLangName.EqualsAscii("JavaScript") ) + { + DBG_ERROR( "_SfxMacroTabPage::EnableButtons(): this is not an up to date usage!" ); + } + else + { + SfxMacroInfo* pInfo = mpImpl->pMacroLB->GetMacroInfo(); + String sSelMacro; + if ( pInfo ) + sSelMacro = pInfo->GetMacroName(); + if( pM && rLangName != pM->GetLanguage() ) + mpImpl->pAssignPB->Enable( pInfo != 0 && !mpImpl->bReadOnly ); + else + mpImpl->pAssignPB->Enable( pInfo && !mpImpl->bReadOnly && !sSelMacro.EqualsIgnoreCaseAscii( sEventMacro ) ); + } + } +} + +_SfxMacroTabPage::_SfxMacroTabPage( Window* pParent, const ResId& rResId, const SfxItemSet& rAttrSet ) + : SfxTabPage( pParent, rResId, rAttrSet ) + +{ + mpImpl = new _SfxMacroTabPage_Impl; + mpImpl->fnGetRange = &_ImpGetRangeHdl; + mpImpl->fnGetMacroOfRange = &_ImpGetMacrosOfRangeHdl; +} + +_SfxMacroTabPage::~_SfxMacroTabPage() +{ + DELETEZ( mpImpl ); +} + +void _SfxMacroTabPage::AddEvent( const String & rEventName, USHORT nEventId ) +{ + String sTmp( rEventName ); + sTmp += '\t'; + + // falls die Tabelle schon gueltig ist + SvxMacro* pM = aTbl.Get( nEventId ); + if( pM ) + { + String sNew( ConvertToUIName_Impl( pM, mpImpl->pScriptTypeLB->GetSelectEntry() ) ); + sTmp += sNew; + } + + SvLBoxEntry* pE = mpImpl->pEventLB->GetListBox().InsertEntry( sTmp ); + pE->SetUserData( reinterpret_cast< void* >( sal::static_int_cast< sal_IntPtr >( nEventId )) ); +} + +void _SfxMacroTabPage::ScriptChanged( const String& aLangName ) +{ + // neue Bereiche und deren Funktionen besorgen + { + mpImpl->pGroupLB->SetScriptType( aLangName ); + mpImpl->pGroupLB->Show(); + mpImpl->pMacroLB->Show(); + mpImpl->pMacroFT->SetText( *mpImpl->pMacroStr ); + } + + EnableButtons( aLangName ); +} + +void _SfxMacroTabPage::SetGetRangeLink( FNGetRangeHdl pFn ) +{ + mpImpl->fnGetRange = pFn; +} + +FNGetRangeHdl _SfxMacroTabPage::GetGetRangeLink() const +{ + return mpImpl->fnGetRange; +} + +void _SfxMacroTabPage::SetGetMacrosOfRangeLink( FNGetMacrosOfRangeHdl pFn ) +{ + mpImpl->fnGetMacroOfRange = pFn; +} + +FNGetMacrosOfRangeHdl _SfxMacroTabPage::GetGetMacrosOfRangeLink() const +{ + return mpImpl->fnGetMacroOfRange; +} + +BOOL _SfxMacroTabPage::FillItemSet( SfxItemSet& rSet ) +{ + SvxMacroItem aItem( GetWhich( aPageRg[0] ) ); + ((SvxMacroTableDtor&)aItem.GetMacroTable()) = aTbl; + + const SfxPoolItem* pItem; + if( SFX_ITEM_SET != GetItemSet().GetItemState( aItem.Which(), TRUE, &pItem ) + || aItem != *(SvxMacroItem*)pItem ) + { + rSet.Put( aItem ); + return TRUE; + } + return FALSE; +} + +void _SfxMacroTabPage::PageCreated (SfxAllItemSet aSet) +{ + const SfxPoolItem* pEventsItem; + if( !mpImpl->bGotEvents && SFX_ITEM_SET == aSet.GetItemState( SID_EVENTCONFIG, TRUE, &pEventsItem ) ) + { + mpImpl->bGotEvents = TRUE; + const SfxEventNamesList& rList = ((SfxEventNamesItem*)pEventsItem)->GetEvents(); + for ( USHORT nNo = 0; nNo < rList.Count(); ++nNo ) + { + const SfxEventName *pOwn = rList.GetObject(nNo); + AddEvent( pOwn->maUIName, pOwn->mnId ); + } + } +} + +void _SfxMacroTabPage::Reset( const SfxItemSet& rSet ) +{ + const SfxPoolItem* pItem; + if( SFX_ITEM_SET == rSet.GetItemState( GetWhich( aPageRg[0] ), TRUE, &pItem )) + aTbl = ((SvxMacroItem*)pItem)->GetMacroTable(); + + const SfxPoolItem* pEventsItem; + if( !mpImpl->bGotEvents && SFX_ITEM_SET == rSet.GetItemState( SID_EVENTCONFIG, TRUE, &pEventsItem ) ) + { + mpImpl->bGotEvents = TRUE; + const SfxEventNamesList& rList = ((SfxEventNamesItem*)pEventsItem)->GetEvents(); + for ( USHORT nNo = 0; nNo < rList.Count(); ++nNo ) + { + const SfxEventName *pOwn = rList.GetObject(nNo); + AddEvent( pOwn->maUIName, pOwn->mnId ); + } + } + + FillEvents(); + + SvHeaderTabListBox& rListBox = mpImpl->pEventLB->GetListBox(); + SvLBoxEntry* pE = rListBox.GetEntry( 0 ); + if( pE ) + rListBox.SetCurEntry( pE ); +} + +void _SfxMacroTabPage::SetReadOnly( BOOL bSet ) +{ + mpImpl->bReadOnly = bSet; +} + +BOOL _SfxMacroTabPage::IsReadOnly() const +{ + return mpImpl->bReadOnly; +} + +IMPL_STATIC_LINK( _SfxMacroTabPage, SelectEvent_Impl, SvTabListBox*, EMPTYARG ) +{ + _SfxMacroTabPage_Impl* pImpl = pThis->mpImpl; + SvHeaderTabListBox& rListBox = pImpl->pEventLB->GetListBox(); + SvLBoxEntry* pE = rListBox.FirstSelected(); + ULONG nPos; + if( !pE || LISTBOX_ENTRY_NOTFOUND == + ( nPos = rListBox.GetModel()->GetAbsPos( pE ) ) ) + { + DBG_ASSERT( pE, "wo kommt der leere Eintrag her?" ); + return 0; + } + + USHORT nEventId = (USHORT)(ULONG)pE->GetUserData(); + String aLanguage = pImpl->pScriptTypeLB->GetSelectEntry(); + + const SvxMacro* pM = pThis->aTbl.Get( nEventId ); + if( pM ) + { + if( aLanguage != pM->GetLanguage() ) + { + pImpl->pScriptTypeLB->SelectEntry( pM->GetLanguage() ); + pThis->ScriptChanged( pM->GetLanguage() ); + } + else + { + DBG_ASSERT( !aLanguage.EqualsAscii("JavaScript"), "_SfxMacroTabPage, SelectEvent_Impl(): outdated use!" ); + } + } + + pThis->EnableButtons( aLanguage ); + return 0; +} + +IMPL_STATIC_LINK( _SfxMacroTabPage, SelectGroup_Impl, ListBox*, EMPTYARG ) +{ + _SfxMacroTabPage_Impl* pImpl = pThis->mpImpl; + String sSel( pImpl->pGroupLB->GetGroup() ); + String aLanguage = pImpl->pScriptTypeLB->GetSelectEntry(); + if( !aLanguage.EqualsAscii( "JavaScript" ) ) + { + pImpl->pGroupLB->GroupSelected(); + SfxMacroInfo* pMacro = pImpl->pMacroLB->GetMacroInfo(); + String aLabelText; + if( pMacro ) + { + aLabelText = pImpl->maStaticMacroLBLabel; + aLabelText += pMacro->GetModuleName(); + } + else + { + // Wenn dort ein Macro drin ist, wurde es selektiert und der + // AssignButton schon in SelectMacro richtig enabled + pImpl->pAssignPB->Enable( FALSE ); + } + + pImpl->pFT_MacroLBLabel->SetText( aLabelText ); + } + return 0; +} + +IMPL_STATIC_LINK( _SfxMacroTabPage, SelectMacro_Impl, ListBox*, EMPTYARG ) +{ + _SfxMacroTabPage_Impl* pImpl = pThis->mpImpl; + pImpl->pMacroLB->FunctionSelected(); + pThis->EnableButtons( pImpl->pScriptTypeLB->GetSelectEntry() ); + return 0; +} + +IMPL_STATIC_LINK( _SfxMacroTabPage, GetFocus_Impl, Edit*, EMPTYARG ) +{ + pThis->EnableButtons( DEFINE_CONST_UNICODE("JavaScript") ); + return 0; +} + +IMPL_STATIC_LINK( _SfxMacroTabPage, AssignDeleteHdl_Impl, PushButton*, pBtn ) +{ + _SfxMacroTabPage_Impl* pImpl = pThis->mpImpl; + SvHeaderTabListBox& rListBox = pImpl->pEventLB->GetListBox(); + SvLBoxEntry* pE = rListBox.FirstSelected(); + ULONG nPos; + if( !pE || LISTBOX_ENTRY_NOTFOUND == + ( nPos = rListBox.GetModel()->GetAbsPos( pE ) ) ) + { + DBG_ASSERT( pE, "wo kommt der leere Eintrag her?" ); + return 0; + } + + const BOOL bAssEnabled = pBtn != pImpl->pDeletePB && pImpl->pAssignPB->IsEnabled(); + + // aus der Tabelle entfernen + USHORT nEvent = (USHORT)(ULONG)pE->GetUserData(); + SvxMacro *pRemoveMacro = pThis->aTbl.Remove( nEvent ); + delete pRemoveMacro; + + String aLanguage = pImpl->pScriptTypeLB->GetSelectEntry(); + String sNew; + if( bAssEnabled ) + { + String sGroup; + String sMacro; + String aEntryText( sNew ); + DBG_ASSERT( !aLanguage.EqualsAscii("JavaScript"), "_SfxMacroTabPage, AssignDeleteHdl_Impl(): outdated use!" ); + + SfxMacroInfo* pMacro = pImpl->pMacroLB->GetMacroInfo(); + sMacro = pMacro->GetQualifiedName(); + sGroup = pImpl->pGroupLB->GetGroup(); + sNew = pMacro->GetMacroName(); + + if( sMacro.CompareToAscii( "vnd.sun.star.script:", 20 ) == COMPARE_EQUAL ) + { + OSL_TRACE("ASSIGN_DELETE: Its a script"); + pThis->aTbl.Insert( + nEvent, new SvxMacro( sMacro, String::CreateFromAscii("Script") ) ); + } + else + { + OSL_TRACE("ASSIGN_DELETE: Its a basic macro"); + String sBasicName/*(SfxResId(STR_BASICNAME))*/; + if ( aLanguage == sBasicName ) + pThis->aTbl.Insert( nEvent, new SvxMacro( sMacro, sGroup, STARBASIC ) ); + else + pThis->aTbl.Insert( nEvent, new SvxMacro( sMacro, aLanguage ) ); + } + } + + pImpl->pEventLB->SetUpdateMode( FALSE ); + pE->ReplaceItem( new SvLBoxString( pE, 0, sNew ), LB_MACROS_ITEMPOS ); + rListBox.GetModel()->InvalidateEntry( pE ); + rListBox.Select( pE ); + rListBox.MakeVisible( pE ); + rListBox.SetUpdateMode( TRUE ); + + pThis->EnableButtons( aLanguage ); + return 0; +} + +IMPL_STATIC_LINK( _SfxMacroTabPage, ChangeScriptHdl_Impl, RadioButton*, EMPTYARG ) +{ + pThis->ScriptChanged( pThis->mpImpl->pScriptTypeLB->GetSelectEntry() ); + return 0; +} + +IMPL_STATIC_LINK( _SfxMacroTabPage, TimeOut_Impl, Timer*, EMPTYARG ) +{ + // FillMacroList() can take a long time -> show wait cursor and disable input + SfxTabDialog* pTabDlg = pThis->GetTabDialog(); + // perhaps the tabpage is part of a SingleTabDialog then pTabDlg == NULL + if ( pTabDlg ) + { + pTabDlg->EnterWait(); + pTabDlg->EnableInput( FALSE ); + } + pThis->FillMacroList(); + if ( pTabDlg ) + { + pTabDlg->EnableInput( TRUE ); + pTabDlg->LeaveWait(); + } + return 0; +} + +void _SfxMacroTabPage::InitAndSetHandler() +{ + // Handler installieren + SvHeaderTabListBox& rListBox = mpImpl->pEventLB->GetListBox(); + HeaderBar& rHeaderBar = mpImpl->pEventLB->GetHeaderBar(); + Link aLnk(STATIC_LINK(this, _SfxMacroTabPage, AssignDeleteHdl_Impl )); + mpImpl->pMacroLB->SetDoubleClickHdl( aLnk ); + mpImpl->pDeletePB->SetClickHdl( aLnk ); + mpImpl->pAssignPB->SetClickHdl( aLnk ); + rListBox.SetDoubleClickHdl( aLnk ); + + rListBox.SetSelectHdl( STATIC_LINK( this, _SfxMacroTabPage, SelectEvent_Impl )); + mpImpl->pGroupLB->SetSelectHdl( STATIC_LINK( this, _SfxMacroTabPage, SelectGroup_Impl )); + mpImpl->pMacroLB->SetSelectHdl( STATIC_LINK( this, _SfxMacroTabPage, SelectMacro_Impl )); + + mpImpl->pScriptTypeLB->SetSelectHdl( STATIC_LINK( this, _SfxMacroTabPage, ChangeScriptHdl_Impl )); + + rListBox.SetSelectionMode( SINGLE_SELECTION ); + rListBox.SetTabs( &nTabs[0], MAP_APPFONT ); + Size aSize( nTabs[ 2 ], 0 ); + rHeaderBar.InsertItem( ITEMID_EVENT, *mpImpl->pStrEvent, LogicToPixel( aSize, MapMode( MAP_APPFONT ) ).Width() ); + aSize.Width() = 1764; // don't know what, so 42^2 is best to use... + rHeaderBar.InsertItem( ITMEID_ASSMACRO, *mpImpl->pAssignedMacro, LogicToPixel( aSize, MapMode( MAP_APPFONT ) ).Width() ); + rListBox.SetSpaceBetweenEntries( 0 ); + + mpImpl->pEventLB->Show(); + mpImpl->pEventLB->ConnectElements(); + + mpImpl->pEventLB->Enable( TRUE ); + mpImpl->pGroupLB->Enable( TRUE ); + mpImpl->pMacroLB->Enable( TRUE ); + + mpImpl->pScriptTypeLB->SetDropDownLineCount( 3 ); + String sBasicName/*(SfxResId(STR_BASICNAME))*/; + mpImpl->pScriptTypeLB->InsertEntry( sBasicName ); + mpImpl->pScriptTypeLB->SelectEntry( sBasicName ); + + mpImpl->pGroupLB->SetFunctionListBox( mpImpl->pMacroLB ); + + mpImpl->maFillGroupTimer.SetTimeoutHdl( STATIC_LINK( this, _SfxMacroTabPage, TimeOut_Impl ) ); + mpImpl->maFillGroupTimer.SetTimeout( 0 ); + mpImpl->maFillGroupTimer.Start(); +} + +void _SfxMacroTabPage::FillMacroList() +{ + String aLanguage = mpImpl->pScriptTypeLB->GetSelectEntry(); + if( ! aLanguage.EqualsAscii("JavaScript") ) + { + // 2 Listboxen + SvStringsDtor* pArr = (*mpImpl->fnGetRange)( this, String(/*SfxResId(STR_BASICNAME)*/) ); + if( pArr ) + { + mpImpl->pGroupLB->Init( + ::com::sun::star::uno::Reference< + ::com::sun::star::lang::XMultiServiceFactory >(), + GetFrame(), + ::rtl::OUString() ); + + delete pArr; + } + } +} + +void _SfxMacroTabPage::FillEvents() +{ + SvHeaderTabListBox& rListBox = mpImpl->pEventLB->GetListBox(); + + String aLanguage = mpImpl->pScriptTypeLB->GetSelectEntry(); + ULONG nEntryCnt = rListBox.GetEntryCount(); + + // Events aus der Tabelle holen und die EventListBox entsprechen fuellen + for( ULONG n = 0 ; n < nEntryCnt ; ++n ) + { + SvLBoxEntry* pE = rListBox.GetEntry( n ); + if( pE ) + { + SvLBoxString* pLItem = ( SvLBoxString* ) pE->GetItem( LB_MACROS_ITEMPOS ); + DBG_ASSERT( pLItem && SV_ITEM_ID_LBOXSTRING == pLItem->IsA(), "_SfxMacroTabPage::FillEvents(): no LBoxString" ); + + String sOld( pLItem->GetText() ); + String sNew; + USHORT nEventId = ( USHORT ) ( ULONG ) pE->GetUserData(); + if( aTbl.IsKeyValid( nEventId ) ) + sNew = ConvertToUIName_Impl( aTbl.Get( nEventId ), aLanguage ); + + if( sOld != sNew ) + { + pE->ReplaceItem( new SvLBoxString( pE, 0, sNew ), LB_MACROS_ITEMPOS ); + rListBox.GetModel()->InvalidateEntry( pE ); + } + } + } +} + +void _SfxMacroTabPage::SelectEvent( const String & /*rEventName*/, USHORT nEventId ) +{ + SvHeaderTabListBox& rListBox = mpImpl->pEventLB->GetListBox(); + ULONG nEntryCnt = rListBox.GetEntryCount(); + + for( ULONG n = 0 ; n < nEntryCnt ; ++n ) + { + SvLBoxEntry* pE = rListBox.GetEntry( n ); + if( pE && ( USHORT ) ( ULONG ) pE->GetUserData() == nEventId ) + { + rListBox.SetCurEntry( pE ); + rListBox.MakeVisible( pE ); + break; + } + } +} + + +SvStringsDtor* __EXPORT _ImpGetRangeHdl( _SfxMacroTabPage* /*pTbPg*/, const String& rLanguage ) +{ + SvStringsDtor* pNew = new SvStringsDtor; + SfxApplication* pSfxApp = SFX_APP(); + + if ( !rLanguage.EqualsAscii("JavaScript") ) + { + pSfxApp->EnterBasicCall(); + + // AppBasic einf"ugen + String* pNewEntry = new String( pSfxApp->GetName() ); + pNew->Insert( pNewEntry, pNew->Count() ); + + // Aktuelles Dokument + SfxObjectShell* pDoc = SfxObjectShell::Current(); + if ( pDoc ) + { + String aTitle = pDoc->GetTitle(); + + // Hack f"ur Aufruf aus der Basic-IDE : das Basic ermitteln, das + // gerade bearbeitet wird + + String aAppName(DEFINE_CONST_UNICODE("BASIC - ")); + USHORT nLen = aAppName.Len(); + if ( aTitle.CompareIgnoreCaseToAscii( aAppName, nLen ) == COMPARE_EQUAL ) + { + // Basic-Namensprefix entfernen + aTitle.Erase( 0, nLen ); + USHORT nIndex=0, nCount=aTitle.GetTokenCount('.'); + if ( nCount > 1 ) + { + // Namen der Library entfernen + aTitle.GetToken( nCount-2, '.', nIndex ); + aTitle.Erase( nIndex-1 ); + } + + // Wenn das App-Basic gerade in der Basic-IDE bearbeitet wird, kein + // Dokument verwenden + pDoc = SfxObjectShell::GetFirst(); + while( pDoc ) + { + if ( aTitle == pDoc->GetTitle() ) + break; + pDoc = SfxObjectShell::GetNext( *pDoc ); + } + } + + if ( pDoc && pDoc->GetBasicManager() != SFX_APP()->GetBasicManager() && + pDoc->GetBasicManager()->GetLibCount() ) + { + pNewEntry = new String( aTitle ); + pNew->Insert( pNewEntry, pNew->Count() ); + } + } + + pSfxApp->LeaveBasicCall(); + } + + return pNew; +} + +// besorgen der Funktionen eines Bereiches +SvStringsDtor* __EXPORT _ImpGetMacrosOfRangeHdl( + _SfxMacroTabPage* /*pTbPg*/, + const String& /*rLanguage*/, + const String& /*rRange*/ ) +{ + SvStringsDtor* pNew = new SvStringsDtor; + return pNew; +} + + +SfxMacroTabPage::SfxMacroTabPage( Window* pParent, const ResId& rResId, const Reference< XFrame >& rxDocumentFrame, const SfxItemSet& rSet ) + : _SfxMacroTabPage( pParent, rResId, rSet ) +{ + mpImpl->pStrEvent = new String( SVX_RES( STR_EVENT ) ); + mpImpl->pAssignedMacro = new String( SVX_RES( STR_ASSMACRO ) ); + mpImpl->pEventLB = new _HeaderTabListBox( this, SVX_RES( LB_EVENT ) ); + mpImpl->pAssignPB = new PushButton( this, SVX_RES( PB_ASSIGN ) ); + mpImpl->pDeletePB = new PushButton( this, SVX_RES( PB_DELETE ) ); + mpImpl->pScriptTypeLB = new ListBox(this, SVX_RES( LB_SCRIPTTYPE ) ); + mpImpl->pScriptTypeLB->Hide(); + mpImpl->pMacroFT = new FixedText( this, SVX_RES( FT_MACRO ) ); + mpImpl->pGroupLB = new SfxConfigGroupListBox_Impl( this, SVX_RES( LB_GROUP ) ); + mpImpl->pFT_MacroLBLabel = new FixedText( this, SVX_RES( FT_LABEL4LB_MACROS ) ); + mpImpl->maStaticMacroLBLabel= mpImpl->pFT_MacroLBLabel->GetText(); + mpImpl->pMacroLB = new SfxConfigFunctionListBox_Impl( this, SVX_RES( LB_MACROS ) ); + mpImpl->pMacroStr = new String( SVX_RES( STR_MACROS ) ); + + FreeResource(); + + SetFrame( rxDocumentFrame ); + + InitAndSetHandler(); + + ScriptChanged( String( /*SfxResId(STR_BASICNAME)*/ ) ); +} + +SfxTabPage* SfxMacroTabPage::Create( Window* pParent, const SfxItemSet& rAttrSet ) +{ + return new SfxMacroTabPage( pParent, SVX_RES( RID_SVXPAGE_EVENTASSIGN ), NULL, rAttrSet ); +} + +SfxMacroAssignDlg::SfxMacroAssignDlg( Window* pParent, const Reference< XFrame >& rxDocumentFrame, const SfxItemSet& rSet ) + : SfxSingleTabDialog( pParent, rSet, 0 ) +{ + SfxTabPage* pPage = SfxMacroTabPage::Create( this, rSet ); + pPage->SetFrame( rxDocumentFrame ); + SetTabPage( pPage ); +} + +SfxMacroAssignDlg::~SfxMacroAssignDlg() +{ +} + + diff --git a/svx/source/cui/macroass.hrc b/svx/source/cui/macroass.hrc new file mode 100644 index 000000000000..626cf010adf9 --- /dev/null +++ b/svx/source/cui/macroass.hrc @@ -0,0 +1,85 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: macropg.hrc,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _MACROASS_HRC +#define _MACROASS_HRC + +#ifndef _SVT_CONTROLDIMS_HRC_ +#include <svtools/controldims.hrc> +#endif + +#define LB_EVENT 2 +#define PB_ASSIGN 3 +#define PB_DELETE 4 +#define FT_MACRO 5 +#define LB_GROUP 6 +#define LB_MACROS 7 +#define LB_SCRIPTTYPE 8 +#define FT_LABEL4LB_MACROS 9 +#define STR_JAVASCRIPT 10 +#define STR_MACROS 11 +#define ED_JAVASCRIPT 12 +#define STR_EVENT 13 +#define STR_ASSMACRO 14 + + +// COL0<---------------WIDTH_1_2--------------->COL3<->COL4<----WIDTH4---->COL5 +// <--WIDTH1-->COL1<-SPACE1->COL2<--WIDTH2-> + +#define WIDTH_TP 260 // of whole tabpage +#define COL5 (WIDTH_TP-RSC_SP_DLG_INNERBORDER_RIGHT) +#define COL4 (COL5-RSC_CD_PUSHBUTTON_WIDTH) +#define COL3 (COL4-RSC_SP_CTRL_X) +#define COL0 (RSC_SP_TBPG_INNERBORDER_LEFT) +#define WIDTH1_2 (COL3-COL0) // width of upper listbox +#define SPACE1 4 // space between lower listboxes +#define WIDTH1 ((WIDTH1_2-SPACE1)/2) // width of lower left listbox +#define WIDTH2 (WIDTH1_2-WIDTH1-SPACE1) // width of lower right listbox +#define COL1 (COL0+WIDTH1) +#define COL2 (COL1+SPACE1) + +#define HEIGHT_TP 185 // of whole tabpage +#define HEIGHT0 62 // of upper listbox +#define ROW0 6 // more than RSC_SP_FLGR_INNERBORDER_TOP cause of bad design +#define ROW1 (ROW0+RSC_CD_PUSHBUTTON_HEIGHT) // Assign button +#define ROW2 (ROW1+RSC_SP_CTRL_GROUP_Y) +#define ROW3 (ROW2+RSC_CD_PUSHBUTTON_HEIGHT) // Remove button +#define ROW4 (ROW3+RSC_SP_CTRL_GROUP_Y) +#define ROW5 (ROW4+RSC_CD_DROPDOWN_HEIGHT) // script type listbox (hidden) +#define ROW6 (ROW0+HEIGHT0) +#define ROW7 (ROW6+RSC_SP_CTRL_Y) +#define HEIGHT_EXTRA7 (RSC_CD_FIXEDTEXT_HEIGHT) // additional height for FT_LABEL4LB_MACROS +#define ROW7A (ROW7+HEIGHT_EXTRA7) +#define ROW8 (ROW7+RSC_CD_FIXEDTEXT_HEIGHT+HEIGHT_EXTRA7)// label for lower listboxes (2 lines!) +#define ROW9 (HEIGHT_TP-RSC_SP_TBPG_INNERBORDER_BOTTOM) +#define HEIGHT8 (ROW9-ROW8) // of lower listboxes + +#endif + diff --git a/svx/source/cui/macroass.hxx b/svx/source/cui/macroass.hxx new file mode 100755 index 000000000000..da4fc49e4596 --- /dev/null +++ b/svx/source/cui/macroass.hxx @@ -0,0 +1,146 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: macropg.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _MACROASS_HXX +#define _MACROASS_HXX + +#include "sal/config.h" + +#include <sfx2/basedlgs.hxx> +#include <sfx2/tabdlg.hxx> +#include <svtools/macitem.hxx> +#include <vcl/lstbox.hxx> +#include <com/sun/star/frame/XFrame.hpp> + +class _SfxMacroTabPage; +class SvStringsDtor; +class SvTabListBox; +class Edit; +class String; + +typedef SvStringsDtor* (*FNGetRangeHdl)( _SfxMacroTabPage*, const String& rLanguage ); +typedef SvStringsDtor* (*FNGetMacrosOfRangeHdl)( _SfxMacroTabPage*, const String& rLanguage, const String& rRange ); + +class SfxConfigGroupListBox_Impl; +class SfxConfigFunctionListBox_Impl; +class _HeaderTabListBox; +class _SfxMacroTabPage_Impl; + +class _SfxMacroTabPage : public SfxTabPage +{ + SvxMacroTableDtor aTbl; + DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, SelectEvent_Impl, SvTabListBox * ); + DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, SelectGroup_Impl, ListBox * ); + DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, SelectMacro_Impl, ListBox * ); + + DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, DoubleClickHdl_Impl, Control* ); + DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, AssignDeleteHdl_Impl, PushButton * ); + + DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, ChangeScriptHdl_Impl, RadioButton * ); + DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, GetFocus_Impl, Edit* ); + DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, TimeOut_Impl, Timer* ); + +protected: + _SfxMacroTabPage_Impl* mpImpl; + + _SfxMacroTabPage( Window* pParent, const ResId& rId, const SfxItemSet& rItemSet ); + + void InitAndSetHandler(); + void FillEvents(); + void FillMacroList(); + void EnableButtons( const String& rLanguage ); + +public: + + virtual ~_SfxMacroTabPage(); + + void AddEvent( const String & rEventName, USHORT nEventId ); + + const SvxMacroTableDtor& GetMacroTbl() const; + void SetMacroTbl( const SvxMacroTableDtor& rTbl ); + void ClearMacroTbl(); + + virtual void ScriptChanged( const String& rLanguage ); + virtual void PageCreated (SfxAllItemSet aSet); + + // zum setzen / abfragen der Links + void SetGetRangeLink( FNGetRangeHdl pFn ); + FNGetRangeHdl GetGetRangeLink() const; + void SetGetMacrosOfRangeLink( FNGetMacrosOfRangeHdl pFn ); + FNGetMacrosOfRangeHdl GetGetMacrosOfRangeLink() const; + + // --------- Erben aus der Basis ------------- + virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual void Reset( const SfxItemSet& rSet ); + + void SetReadOnly( BOOL bSet ); + BOOL IsReadOnly() const; + void SelectEvent( const String& rEventName, USHORT nEventId ); +}; + +inline const SvxMacroTableDtor& _SfxMacroTabPage::GetMacroTbl() const +{ + return aTbl; +} + +inline void _SfxMacroTabPage::SetMacroTbl( const SvxMacroTableDtor& rTbl ) +{ + aTbl = rTbl; +} + +inline void _SfxMacroTabPage::ClearMacroTbl() +{ + aTbl.DelDtor(); +} + +class SfxMacroTabPage : public _SfxMacroTabPage +{ +public: + SfxMacroTabPage( + Window* pParent, + const ResId& rId, + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxDocumentFrame, + const SfxItemSet& rSet + ); + + // --------- Erben aus der Basis ------------- + static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); +}; + +class SfxMacroAssignDlg : public SfxSingleTabDialog +{ +public: + SfxMacroAssignDlg( + Window* pParent, + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxDocumentFrame, + const SfxItemSet& rSet ); + virtual ~SfxMacroAssignDlg(); +}; + +#endif diff --git a/svx/source/cui/macroass.src b/svx/source/cui/macroass.src new file mode 100644 index 000000000000..bb56baae45f6 --- /dev/null +++ b/svx/source/cui/macroass.src @@ -0,0 +1,143 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: macropg.src,v $ + * $Revision: 1.39 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include "macroass.hrc" +#include "svx/dialogs.hrc" +#include "helpid.hrc" +TabPage RID_SVXPAGE_EVENTASSIGN +{ + Hide = TRUE ; + SVLook = TRUE ; + DialogControl = TRUE ; + Size = MAP_APPFONT ( WIDTH_TP , HEIGHT_TP ) ; + Text [ en-US ] = "Assign Macro" ; + String STR_EVENT + { + Text [ en-US ] = "Event" ; + }; + String STR_ASSMACRO + { + Text [ en-US ] = "Assigned macro"; + }; + Control LB_EVENT + { + Border = TRUE ; + Pos = MAP_APPFONT ( COL0 , ROW0 ) ; + Size = MAP_APPFONT ( WIDTH1_2 , HEIGHT0 ) ; + TabStop = TRUE ; + DialogControl = TRUE ; + ClipChildren = TRUE ; + Disable = TRUE ; + Group = TRUE ; + HelpID = HID_MACRO_LB_EVENT ; + }; + FixedText FT_MACRO + { + Pos = MAP_APPFONT ( COL0 , ROW7A ) ; + Size = MAP_APPFONT ( WIDTH1 , RSC_CD_FIXEDTEXT_HEIGHT ) ; + Group = TRUE ; + }; + Control LB_GROUP + { + Border = TRUE ; + Pos = MAP_APPFONT ( COL0 , ROW8 ) ; + Size = MAP_APPFONT ( WIDTH1 , HEIGHT8 ) ; + TabStop = TRUE ; + Group = TRUE ; + HelpId = HID_MACRO_GROUP ; + }; + FixedText FT_LABEL4LB_MACROS + { + Pos = MAP_APPFONT ( COL2 , ROW7 ) ; + Size = MAP_APPFONT ( WIDTH1 , RSC_CD_FIXEDTEXT_HEIGHT + HEIGHT_EXTRA7 ) ; + WordBreak = TRUE; + Text [ en-US ] = "~Existing macros in:\n" ; + }; + Control LB_MACROS + { + Border = TRUE ; + Pos = MAP_APPFONT ( COL2 , ROW8 ) ; + Size = MAP_APPFONT ( WIDTH2 , HEIGHT8 ) ; + TabStop = TRUE ; + HelpId = HID_MACRO_MACROS ; + }; + PushButton PB_ASSIGN + { + Pos = MAP_APPFONT ( COL4 , ROW0 ) ; + Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ; + // ### ACHTUNG: Neuer Text in Resource? Z~uweisen : Zuweisen + Disable = TRUE ; + TabStop = TRUE ; + Text [ en-US ] = "~Assign" ; + }; + PushButton PB_DELETE + { + Pos = MAP_APPFONT ( COL4 , ROW2 ) ; + Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ; + Disable = TRUE ; + TabStop = TRUE ; + Text [ en-US ] = "~Remove" ; + }; + ListBox LB_SCRIPTTYPE + { + Pos = MAP_APPFONT ( COL4 , ROW4 ) ; + Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , 60 ) ; + // en-US was missing + Text [ en-US ] = "~Scripting Language" ; + TabStop = TRUE ; + Disable = FALSE ; + DropDown = TRUE ; + }; + String STR_MACROS + { + Text [ en-US ] = "Macros" ; + }; +}; + + + + + + + + + + + + + + + + + + + + + diff --git a/svx/source/dialog/macropg.cxx b/svx/source/cui/macropg.cxx index 6eeba1b0e703..6eeba1b0e703 100644 --- a/svx/source/dialog/macropg.cxx +++ b/svx/source/cui/macropg.cxx diff --git a/svx/source/dialog/macropg.hrc b/svx/source/cui/macropg.hrc index ccf348d0cee0..ccf348d0cee0 100644 --- a/svx/source/dialog/macropg.hrc +++ b/svx/source/cui/macropg.hrc diff --git a/svx/inc/macropg.hxx b/svx/source/cui/macropg.hxx index 1eba2a28f596..37f714028c82 100644 --- a/svx/inc/macropg.hxx +++ b/svx/source/cui/macropg.hxx @@ -42,14 +42,13 @@ #include <vcl/lstbox.hxx> #endif #include <rtl/ustring.hxx> -#include "svx/svxdllapi.h" #include <hash_map> #include <vector> typedef ::std::hash_map< ::rtl::OUString, ::std::pair< ::rtl::OUString, ::rtl::OUString >, ::rtl::OUStringHash, ::std::equal_to< ::rtl::OUString > > EventsHash; -struct SVX_DLLPRIVATE EventDisplayName +struct EventDisplayName { const sal_Char* pAsciiEventName; USHORT nEventResourceID; @@ -131,7 +130,7 @@ public: typedef USHORT* (*GetTabPageRanges)(); // liefert internationale Which-Werte -class SVX_DLLPUBLIC SvxMacroAssignSingleTabDialog : public SfxModalDialog +class SvxMacroAssignSingleTabDialog : public SfxModalDialog { public: SvxMacroAssignSingleTabDialog( Window* pParent, const SfxItemSet& rOptionsSet, USHORT nUniqueId ); @@ -163,7 +162,7 @@ private: }; -class SVX_DLLPUBLIC SvxMacroAssignDlg : public SvxMacroAssignSingleTabDialog +class SvxMacroAssignDlg : public SvxMacroAssignSingleTabDialog { public: SvxMacroAssignDlg( diff --git a/svx/source/dialog/macropg.src b/svx/source/cui/macropg.src index 84fdb5c1af7f..84fdb5c1af7f 100644 --- a/svx/source/dialog/macropg.src +++ b/svx/source/cui/macropg.src diff --git a/svx/source/cui/makefile.mk b/svx/source/cui/makefile.mk new file mode 100755 index 000000000000..7db32bb15f7a --- /dev/null +++ b/svx/source/cui/makefile.mk @@ -0,0 +1,232 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2008 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.65 $ +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* +PRJ=..$/.. +PRJNAME=svx +TARGET=cui +ENABLE_EXCEPTIONS=TRUE + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk +.INCLUDE : $(PRJ)$/util$/makefile.pmk + +.IF "$(ENABLE_LAYOUT)" == "TRUE" +CFLAGS+= -DENABLE_LAYOUT=1 -I../$(PRJ)/layout/inc -I../$(PRJ)/layout/$(INPATH)/inc +.ENDIF # ENABLE_LAYOUT == TRUE + +# --- Files -------------------------------------------------------- + +SRS1NAME=cui +SRC1FILES = \ + acccfg.src \ + align.src \ + autocdlg.src \ + backgrnd.src \ + bbdlg.src \ + border.src \ + cfg.src \ + chardlg.src \ + charmap.src \ + commonlingui.src \ + connect.src \ + connpooloptions.src \ + cuiimapdlg.src \ + dbregister.src \ + doclinkdialog.src \ + dstribut.src \ + eventdlg.src \ + fontsubs.src \ + grfflt.src \ + grfpage.src \ + hangulhanjadlg.src \ + hlmarkwn.src\ + iconcdlg.src \ + internationaloptions.src \ + macroass.src \ + macropg.src \ + measure.src \ + newtabledlg.src \ + numfmt.src \ + numpages.src \ + optfltr.src \ + optgdlg.src \ + opthtml.src \ + optjava.src \ + optmemory.src \ + optupdt.src \ + page.src \ + paragrph.src \ + postdlg.src \ + readonlyimage.src \ + scriptdlg.src \ + sdrcelldlg.src \ + securityoptions.src \ + selector.src \ + SpellDialog.src \ + splitcelldlg.src\ + srchxtra.src \ + svuidlg.src \ + swpossizetabpage.src \ + tabstpge.src \ + textanim.src \ + textattr.src \ + treeopt.src \ + webconninfo.src \ + zoom.src + +SRS2NAME=cuidrawdlgs +SRC2FILES = \ + dlgname.src \ + labdlg.src \ + tabarea.src \ + tabline.src \ + transfrm.src + +SLOFILES+=\ + $(SLO)$/tparea.obj \ + $(SLO)$/borderconn.obj \ + $(SLO)$/cuiexp.obj \ + $(SLO)$/dlgfact.obj \ + $(SLO)$/init.obj \ + $(SLO)$/scriptdlg.obj \ + $(SLO)$/commonlingui.obj \ + $(SLO)$/selector.obj \ + $(SLO)$/fontsubs.obj \ + $(SLO)$/linkdlg.obj \ + $(SLO)$/pastedlg.obj \ + $(SLO)$/plfilter.obj \ + $(SLO)$/insdlg.obj \ + $(SLO)$/optHeaderTabListbox.obj \ + $(SLO)$/sdbcdriverenum.obj \ + $(SLO)$/connpoolsettings.obj \ + $(SLO)$/dbregisterednamesconfig.obj \ + $(SLO)$/dbregistersettings.obj \ + $(SLO)$/dbregister.obj \ + $(SLO)$/doclinkdialog.obj \ + $(SLO)$/connpoolconfig.obj \ + $(SLO)$/internationaloptions.obj \ + $(SLO)$/connpooloptions.obj \ + $(SLO)$/optgdlg.obj \ + $(SLO)$/optmemory.obj \ + $(SLO)$/opthtml.obj \ + $(SLO)$/optfltr.obj \ + $(SLO)$/treeopt.obj \ + $(SLO)$/autocdlg.obj \ + $(SLO)$/textanim.obj \ + $(SLO)$/labdlg.obj \ + $(SLO)$/dstribut.obj \ + $(SLO)$/hangulhanjadlg.obj \ + $(SLO)$/showcols.obj \ + $(SLO)$/zoom.obj \ + $(SLO)$/cuigaldlg.obj \ + $(SLO)$/cuiimapwnd.obj \ + $(SLO)$/hlmarkwn.obj \ + $(SLO)$/cuicharmap.obj \ + $(SLO)$/srchxtra.obj \ + $(SLO)$/bbdlg.obj \ + $(SLO)$/swpossizetabpage.obj \ + $(SLO)$/transfrm.obj \ + $(SLO)$/cuisrchdlg.obj \ + $(SLO)$/cuitbxform.obj \ + $(SLO)$/optdict.obj \ + $(SLO)$/dlgname.obj \ + $(SLO)$/multipat.obj \ + $(SLO)$/multifil.obj \ + $(SLO)$/iconcdlg.obj \ + $(SLO)$/hltpbase.obj \ + $(SLO)$/hldocntp.obj \ + $(SLO)$/hldoctp.obj \ + $(SLO)$/hlinettp.obj \ + $(SLO)$/hlmailtp.obj \ + $(SLO)$/cuihyperdlg.obj \ + $(SLO)$/cuifmsearch.obj \ + $(SLO)$/cuigrfflt.obj \ + $(SLO)$/readonlyimage.obj \ + $(SLO)$/optaccessibility.obj \ + $(SLO)$/optsave.obj \ + $(SLO)$/optasian.obj \ + $(SLO)$/optpath.obj \ + $(SLO)$/optcolor.obj \ + $(SLO)$/optjsearch.obj \ + $(SLO)$/optinet2.obj \ + $(SLO)$/securityoptions.obj \ + $(SLO)$/webconninfo.obj \ + $(SLO)$/optctl.obj \ + $(SLO)$/optjava.obj \ + $(SLO)$/optupdt.obj \ + $(SLO)$/optimprove.obj \ + $(SLO)$/optimprove2.obj \ + $(SLO)$/optgenrl.obj \ + $(SLO)$/connect.obj \ + $(SLO)$/tabarea.obj \ + $(SLO)$/tabline.obj \ + $(SLO)$/measure.obj \ + $(SLO)$/tpshadow.obj \ + $(SLO)$/tpline.obj \ + $(SLO)$/tpgradnt.obj \ + $(SLO)$/tpcolor.obj \ + $(SLO)$/tpbitmap.obj \ + $(SLO)$/tphatch.obj \ + $(SLO)$/tplneend.obj \ + $(SLO)$/tplnedef.obj \ + $(SLO)$/SpellAttrib.obj \ + $(SLO)$/SpellDialog.obj \ + $(SLO)$/numpages.obj \ + $(SLO)$/paragrph.obj \ + $(SLO)$/tabstpge.obj \ + $(SLO)$/textattr.obj \ + $(SLO)$/align.obj \ + $(SLO)$/backgrnd.obj \ + $(SLO)$/border.obj \ + $(SLO)$/chardlg.obj \ + $(SLO)$/numfmt.obj \ + $(SLO)$/page.obj \ + $(SLO)$/postdlg.obj \ + $(SLO)$/sdrcelldlg.obj \ + $(SLO)$/splitcelldlg.obj \ + $(SLO)$/newtabledlg.obj \ + $(SLO)$/grfpage.obj \ + $(SLO)$/cfgchart.obj \ + $(SLO)$/eventdlg.obj \ + $(SLO)$/macropg.obj \ + $(SLO)$/acccfg.obj\ + $(SLO)$/macroass.obj \ + $(SLO)$/cfg.obj \ + $(SLO)$/cfgutil.obj \ + $(SLO)$/optchart.obj + +.IF "$(GUI)"=="WNT" +SLOFILES+=$(SLO)$/winpluginlib.obj +.ENDIF + +# --- Targets ------------------------------------------------------- + +.INCLUDE : target.mk diff --git a/svx/source/dialog/measure.cxx b/svx/source/cui/measure.cxx index 38eaf11ced7a..38eaf11ced7a 100644 --- a/svx/source/dialog/measure.cxx +++ b/svx/source/cui/measure.cxx diff --git a/svx/source/dialog/measure.hrc b/svx/source/cui/measure.hrc index b06a36775b3b..b06a36775b3b 100644 --- a/svx/source/dialog/measure.hrc +++ b/svx/source/cui/measure.hrc diff --git a/svx/source/dialog/measure.hxx b/svx/source/cui/measure.hxx index 1c51d94767c8..1c51d94767c8 100644 --- a/svx/source/dialog/measure.hxx +++ b/svx/source/cui/measure.hxx diff --git a/svx/source/dialog/measure.src b/svx/source/cui/measure.src index df394e4bdbe3..df394e4bdbe3 100644 --- a/svx/source/dialog/measure.src +++ b/svx/source/cui/measure.src diff --git a/svx/source/dialog/multifil.cxx b/svx/source/cui/multifil.cxx index bec7b6d5cafa..bec7b6d5cafa 100644 --- a/svx/source/dialog/multifil.cxx +++ b/svx/source/cui/multifil.cxx diff --git a/svx/source/dialog/multifil.hxx b/svx/source/cui/multifil.hxx index 242e28c17707..242e28c17707 100644 --- a/svx/source/dialog/multifil.hxx +++ b/svx/source/cui/multifil.hxx diff --git a/svx/source/dialog/multipat.cxx b/svx/source/cui/multipat.cxx index 49357245b819..49357245b819 100644 --- a/svx/source/dialog/multipat.cxx +++ b/svx/source/cui/multipat.cxx diff --git a/svx/source/dialog/multipat.hxx b/svx/source/cui/multipat.hxx index e7fd86799955..e7fd86799955 100644 --- a/svx/source/dialog/multipat.hxx +++ b/svx/source/cui/multipat.hxx diff --git a/svx/source/dialog/newtabledlg.cxx b/svx/source/cui/newtabledlg.cxx index c59be62607cd..c59be62607cd 100644 --- a/svx/source/dialog/newtabledlg.cxx +++ b/svx/source/cui/newtabledlg.cxx diff --git a/svx/source/dialog/newtabledlg.hrc b/svx/source/cui/newtabledlg.hrc index b17631658341..b17631658341 100644 --- a/svx/source/dialog/newtabledlg.hrc +++ b/svx/source/cui/newtabledlg.hrc diff --git a/svx/source/dialog/newtabledlg.hxx b/svx/source/cui/newtabledlg.hxx index 9d29152a656f..9d29152a656f 100644 --- a/svx/source/dialog/newtabledlg.hxx +++ b/svx/source/cui/newtabledlg.hxx diff --git a/svx/source/dialog/newtabledlg.src b/svx/source/cui/newtabledlg.src index e72756da03db..e72756da03db 100644 --- a/svx/source/dialog/newtabledlg.src +++ b/svx/source/cui/newtabledlg.src diff --git a/svx/source/dialog/numfmt.cxx b/svx/source/cui/numfmt.cxx index 2f11f1af0223..2f11f1af0223 100644 --- a/svx/source/dialog/numfmt.cxx +++ b/svx/source/cui/numfmt.cxx diff --git a/svx/source/dialog/numfmt.hrc b/svx/source/cui/numfmt.hrc index 7f63e02b57d5..7f63e02b57d5 100644 --- a/svx/source/dialog/numfmt.hrc +++ b/svx/source/cui/numfmt.hrc diff --git a/svx/source/dialog/numfmt.hxx b/svx/source/cui/numfmt.hxx index ff9d0813f6e5..ff9d0813f6e5 100644 --- a/svx/source/dialog/numfmt.hxx +++ b/svx/source/cui/numfmt.hxx diff --git a/svx/source/dialog/numfmt.src b/svx/source/cui/numfmt.src index ab71ae446998..ab71ae446998 100644 --- a/svx/source/dialog/numfmt.src +++ b/svx/source/cui/numfmt.src diff --git a/svx/source/dialog/numpages.cxx b/svx/source/cui/numpages.cxx index fd6e63a3b2fa..0e2840894e9a 100644 --- a/svx/source/dialog/numpages.cxx +++ b/svx/source/cui/numpages.cxx @@ -61,13 +61,10 @@ #include <sfx2/objsh.hxx> #include <vcl/graph.hxx> #include <vcl/msgbox.hxx> -#include <svx/charmap.hxx> +#include "cuicharmap.hxx" #include <flstitem.hxx> #include <dlgutil.hxx> -#ifndef _XTABLE_HXX //autogen - #include <svx/xtable.hxx> -#endif #include <drawitem.hxx> #include <numvset.hxx> #include <htmlmode.hxx> @@ -87,8 +84,6 @@ #include <vector> #include "opengrf.hxx" - -#include <svx/svxdlg.hxx> //CHINA001 #include <svx/dialogs.hrc> //CHINA001 #include <sfx2/request.hxx> //CHINA001 #include <svtools/aeitem.hxx> //add CHINA001 @@ -2377,11 +2372,7 @@ IMPL_LINK( SvxNumOptionsTabPage, PopupActivateHdl_Impl, Menu *, EMPTYARG ) --------------------------------------------------*/ IMPL_LINK( SvxNumOptionsTabPage, BulletHdl_Impl, Button *, EMPTYARG ) { - //CHINA001 SvxCharacterMap* pMap = new SvxCharacterMap(this, TRUE); - SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - DBG_ASSERT(pFact, "Dialogdiet fail!");//CHINA001 - AbstractSvxCharacterMap* pMap = pFact->CreateSvxCharacterMap( this, RID_SVXDLG_CHARMAP, TRUE ); - DBG_ASSERT(pMap, "Dialogdiet fail!");//CHINA001 + SvxCharacterMap* pMap = new SvxCharacterMap( this, TRUE ); USHORT nMask = 1; const Font* pFmtFont = 0; @@ -2428,7 +2419,7 @@ IMPL_LINK( SvxNumOptionsTabPage, BulletHdl_Impl, Button *, EMPTYARG ) { SvxNumberFormat aNumFmt(pActNum->GetLevel(i)); aNumFmt.SetBulletFont(&aActBulletFont); ; - aNumFmt.SetBulletChar( pMap->GetChar() ); + aNumFmt.SetBulletChar( (sal_Unicode) pMap->GetChar() ); pActNum->SetLevel(i, aNumFmt); } _nMask <<= 1; diff --git a/svx/source/dialog/numpages.hrc b/svx/source/cui/numpages.hrc index 59ea5d0e8a94..59ea5d0e8a94 100644 --- a/svx/source/dialog/numpages.hrc +++ b/svx/source/cui/numpages.hrc diff --git a/svx/source/dialog/numpages.hxx b/svx/source/cui/numpages.hxx index 9e3447228b45..9e3447228b45 100644 --- a/svx/source/dialog/numpages.hxx +++ b/svx/source/cui/numpages.hxx diff --git a/svx/source/dialog/numpages.src b/svx/source/cui/numpages.src index e202b2d13a84..e202b2d13a84 100644 --- a/svx/source/dialog/numpages.src +++ b/svx/source/cui/numpages.src diff --git a/svx/source/dialog/optHeaderTabListbox.cxx b/svx/source/cui/optHeaderTabListbox.cxx index 4ffbd122dbab..4ffbd122dbab 100644 --- a/svx/source/dialog/optHeaderTabListbox.cxx +++ b/svx/source/cui/optHeaderTabListbox.cxx diff --git a/svx/source/dialog/optHeaderTabListbox.hxx b/svx/source/cui/optHeaderTabListbox.hxx index 26608d9791b8..26608d9791b8 100644 --- a/svx/source/dialog/optHeaderTabListbox.hxx +++ b/svx/source/cui/optHeaderTabListbox.hxx diff --git a/svx/source/dialog/optaccessibility.cxx b/svx/source/cui/optaccessibility.cxx index 749e98a7d5c2..749e98a7d5c2 100644 --- a/svx/source/dialog/optaccessibility.cxx +++ b/svx/source/cui/optaccessibility.cxx diff --git a/svx/source/dialog/optaccessibility.hxx b/svx/source/cui/optaccessibility.hxx index ff0eee457c1a..ff0eee457c1a 100644 --- a/svx/source/dialog/optaccessibility.hxx +++ b/svx/source/cui/optaccessibility.hxx diff --git a/svx/source/dialog/optasian.cxx b/svx/source/cui/optasian.cxx index d96dcdd13c1f..d96dcdd13c1f 100644 --- a/svx/source/dialog/optasian.cxx +++ b/svx/source/cui/optasian.cxx diff --git a/svx/source/dialog/optasian.hxx b/svx/source/cui/optasian.hxx index 98c142031cd2..98c142031cd2 100644 --- a/svx/source/dialog/optasian.hxx +++ b/svx/source/cui/optasian.hxx diff --git a/svx/source/dialog/optchart.cxx b/svx/source/cui/optchart.cxx index 652c0500a8d9..652c0500a8d9 100644 --- a/svx/source/dialog/optchart.cxx +++ b/svx/source/cui/optchart.cxx diff --git a/svx/source/dialog/optchart.hxx b/svx/source/cui/optchart.hxx index 9316d2a8ea85..9316d2a8ea85 100644 --- a/svx/source/dialog/optchart.hxx +++ b/svx/source/cui/optchart.hxx diff --git a/svx/source/dialog/optcolor.cxx b/svx/source/cui/optcolor.cxx index 11112dd936cd..11112dd936cd 100644 --- a/svx/source/dialog/optcolor.cxx +++ b/svx/source/cui/optcolor.cxx diff --git a/svx/source/dialog/optcolor.hxx b/svx/source/cui/optcolor.hxx index c50062f15366..c50062f15366 100644 --- a/svx/source/dialog/optcolor.hxx +++ b/svx/source/cui/optcolor.hxx diff --git a/svx/source/dialog/optctl.cxx b/svx/source/cui/optctl.cxx index a2a2b2cc461c..a2a2b2cc461c 100644 --- a/svx/source/dialog/optctl.cxx +++ b/svx/source/cui/optctl.cxx diff --git a/svx/source/dialog/optctl.hxx b/svx/source/cui/optctl.hxx index 0dae0e24f180..0dae0e24f180 100644 --- a/svx/source/dialog/optctl.hxx +++ b/svx/source/cui/optctl.hxx diff --git a/svx/source/dialog/optdict.cxx b/svx/source/cui/optdict.cxx index 88674c141b36..88674c141b36 100644 --- a/svx/source/dialog/optdict.cxx +++ b/svx/source/cui/optdict.cxx diff --git a/svx/source/dialog/optdict.hxx b/svx/source/cui/optdict.hxx index b09c1d1e773e..b09c1d1e773e 100644 --- a/svx/source/dialog/optdict.hxx +++ b/svx/source/cui/optdict.hxx diff --git a/svx/source/dialog/optfltr.cxx b/svx/source/cui/optfltr.cxx index d6c838a13314..d6c838a13314 100644 --- a/svx/source/dialog/optfltr.cxx +++ b/svx/source/cui/optfltr.cxx diff --git a/svx/source/dialog/optfltr.hrc b/svx/source/cui/optfltr.hrc index dad722916860..dad722916860 100644 --- a/svx/source/dialog/optfltr.hrc +++ b/svx/source/cui/optfltr.hrc diff --git a/svx/source/dialog/optfltr.hxx b/svx/source/cui/optfltr.hxx index 6f8c975098db..6f8c975098db 100644 --- a/svx/source/dialog/optfltr.hxx +++ b/svx/source/cui/optfltr.hxx diff --git a/svx/source/dialog/optfltr.src b/svx/source/cui/optfltr.src index 9e932406b265..9e932406b265 100644 --- a/svx/source/dialog/optfltr.src +++ b/svx/source/cui/optfltr.src diff --git a/svx/source/dialog/optgdlg.cxx b/svx/source/cui/optgdlg.cxx index 9e6cd3b5a7f8..9e6cd3b5a7f8 100644 --- a/svx/source/dialog/optgdlg.cxx +++ b/svx/source/cui/optgdlg.cxx diff --git a/svx/source/dialog/optgdlg.hrc b/svx/source/cui/optgdlg.hrc index b8dc903879ed..b8dc903879ed 100644 --- a/svx/source/dialog/optgdlg.hrc +++ b/svx/source/cui/optgdlg.hrc diff --git a/svx/source/dialog/optgdlg.hxx b/svx/source/cui/optgdlg.hxx index c44087708b31..c44087708b31 100644 --- a/svx/source/dialog/optgdlg.hxx +++ b/svx/source/cui/optgdlg.hxx diff --git a/svx/source/dialog/optgdlg.src b/svx/source/cui/optgdlg.src index 7f3ad6968079..7f3ad6968079 100644 --- a/svx/source/dialog/optgdlg.src +++ b/svx/source/cui/optgdlg.src diff --git a/svx/source/dialog/optgenrl.cxx b/svx/source/cui/optgenrl.cxx index 1766dd58de72..1766dd58de72 100644 --- a/svx/source/dialog/optgenrl.cxx +++ b/svx/source/cui/optgenrl.cxx diff --git a/svx/source/dialog/opthtml.cxx b/svx/source/cui/opthtml.cxx index 837768dded1a..837768dded1a 100644 --- a/svx/source/dialog/opthtml.cxx +++ b/svx/source/cui/opthtml.cxx diff --git a/svx/source/dialog/opthtml.hrc b/svx/source/cui/opthtml.hrc index 6525a31fc877..6525a31fc877 100644 --- a/svx/source/dialog/opthtml.hrc +++ b/svx/source/cui/opthtml.hrc diff --git a/svx/source/dialog/opthtml.hxx b/svx/source/cui/opthtml.hxx index cfdb8821bec4..cfdb8821bec4 100644 --- a/svx/source/dialog/opthtml.hxx +++ b/svx/source/cui/opthtml.hxx diff --git a/svx/source/dialog/opthtml.src b/svx/source/cui/opthtml.src index dc5b5f9431c7..dc5b5f9431c7 100644 --- a/svx/source/dialog/opthtml.src +++ b/svx/source/cui/opthtml.src diff --git a/svx/source/dialog/optimprove.cxx b/svx/source/cui/optimprove.cxx index e644cc58d7b8..e644cc58d7b8 100644 --- a/svx/source/dialog/optimprove.cxx +++ b/svx/source/cui/optimprove.cxx diff --git a/svx/source/dialog/optimprove2.cxx b/svx/source/cui/optimprove2.cxx index 28989080ca0a..28989080ca0a 100644 --- a/svx/source/dialog/optimprove2.cxx +++ b/svx/source/cui/optimprove2.cxx diff --git a/svx/source/dialog/optinet2.cxx b/svx/source/cui/optinet2.cxx index 01d97a9e7e0b..01d97a9e7e0b 100644 --- a/svx/source/dialog/optinet2.cxx +++ b/svx/source/cui/optinet2.cxx diff --git a/svx/source/dialog/optinet2.hxx b/svx/source/cui/optinet2.hxx index 0f1364b716f8..0f1364b716f8 100644 --- a/svx/source/dialog/optinet2.hxx +++ b/svx/source/cui/optinet2.hxx diff --git a/svx/source/dialog/optjava.cxx b/svx/source/cui/optjava.cxx index 549a4c09c96d..549a4c09c96d 100644 --- a/svx/source/dialog/optjava.cxx +++ b/svx/source/cui/optjava.cxx diff --git a/svx/source/dialog/optjava.hrc b/svx/source/cui/optjava.hrc index ac4b0108cc47..ac4b0108cc47 100644 --- a/svx/source/dialog/optjava.hrc +++ b/svx/source/cui/optjava.hrc diff --git a/svx/source/dialog/optjava.hxx b/svx/source/cui/optjava.hxx index fb2a56162175..fb2a56162175 100644 --- a/svx/source/dialog/optjava.hxx +++ b/svx/source/cui/optjava.hxx diff --git a/svx/source/dialog/optjava.src b/svx/source/cui/optjava.src index 56ea49e1b3fd..56ea49e1b3fd 100644 --- a/svx/source/dialog/optjava.src +++ b/svx/source/cui/optjava.src diff --git a/svx/source/dialog/optjsearch.cxx b/svx/source/cui/optjsearch.cxx index cbc6d605ba03..cbc6d605ba03 100644 --- a/svx/source/dialog/optjsearch.cxx +++ b/svx/source/cui/optjsearch.cxx diff --git a/svx/source/dialog/optjsearch.hxx b/svx/source/cui/optjsearch.hxx index e1d1de79ae2e..e1d1de79ae2e 100644 --- a/svx/source/dialog/optjsearch.hxx +++ b/svx/source/cui/optjsearch.hxx diff --git a/svx/source/dialog/optmemory.cxx b/svx/source/cui/optmemory.cxx index ac5a1809fc7b..ac5a1809fc7b 100644 --- a/svx/source/dialog/optmemory.cxx +++ b/svx/source/cui/optmemory.cxx diff --git a/svx/source/dialog/optmemory.hrc b/svx/source/cui/optmemory.hrc index 0ba3f833d2e7..0ba3f833d2e7 100644 --- a/svx/source/dialog/optmemory.hrc +++ b/svx/source/cui/optmemory.hrc diff --git a/svx/source/dialog/optmemory.hxx b/svx/source/cui/optmemory.hxx index f385dd60875f..f385dd60875f 100644 --- a/svx/source/dialog/optmemory.hxx +++ b/svx/source/cui/optmemory.hxx diff --git a/svx/source/dialog/optmemory.src b/svx/source/cui/optmemory.src index fce14b15551d..fce14b15551d 100644 --- a/svx/source/dialog/optmemory.src +++ b/svx/source/cui/optmemory.src diff --git a/svx/source/dialog/optpath.cxx b/svx/source/cui/optpath.cxx index b31d56493aed..b31d56493aed 100644 --- a/svx/source/dialog/optpath.cxx +++ b/svx/source/cui/optpath.cxx diff --git a/svx/source/dialog/optpath.hxx b/svx/source/cui/optpath.hxx index c05b0b778c58..c05b0b778c58 100644 --- a/svx/source/dialog/optpath.hxx +++ b/svx/source/cui/optpath.hxx diff --git a/svx/source/dialog/optsave.cxx b/svx/source/cui/optsave.cxx index 67ac02536b47..67ac02536b47 100644 --- a/svx/source/dialog/optsave.cxx +++ b/svx/source/cui/optsave.cxx diff --git a/svx/source/dialog/optsave.hxx b/svx/source/cui/optsave.hxx index 8c9fcbc75ac8..8c9fcbc75ac8 100644 --- a/svx/source/dialog/optsave.hxx +++ b/svx/source/cui/optsave.hxx diff --git a/svx/source/dialog/optupdt.cxx b/svx/source/cui/optupdt.cxx index ebe23d52b66d..ebe23d52b66d 100644 --- a/svx/source/dialog/optupdt.cxx +++ b/svx/source/cui/optupdt.cxx diff --git a/svx/source/dialog/optupdt.hrc b/svx/source/cui/optupdt.hrc index d9e77f7f1403..d9e77f7f1403 100644 --- a/svx/source/dialog/optupdt.hrc +++ b/svx/source/cui/optupdt.hrc diff --git a/svx/source/dialog/optupdt.hxx b/svx/source/cui/optupdt.hxx index 4aa380844602..4aa380844602 100644 --- a/svx/source/dialog/optupdt.hxx +++ b/svx/source/cui/optupdt.hxx diff --git a/svx/source/dialog/optupdt.src b/svx/source/cui/optupdt.src index 043abb8b6a95..043abb8b6a95 100644 --- a/svx/source/dialog/optupdt.src +++ b/svx/source/cui/optupdt.src diff --git a/svx/source/dialog/page.cxx b/svx/source/cui/page.cxx index 140a7cb646ab..140a7cb646ab 100644 --- a/svx/source/dialog/page.cxx +++ b/svx/source/cui/page.cxx diff --git a/svx/source/dialog/page.h b/svx/source/cui/page.h index 60f962565d33..60f962565d33 100644 --- a/svx/source/dialog/page.h +++ b/svx/source/cui/page.h diff --git a/svx/source/dialog/page.hrc b/svx/source/cui/page.hrc index bd2810a39061..bd2810a39061 100644 --- a/svx/source/dialog/page.hrc +++ b/svx/source/cui/page.hrc diff --git a/svx/source/dialog/page.hxx b/svx/source/cui/page.hxx index 5b04e91ac387..5b04e91ac387 100644 --- a/svx/source/dialog/page.hxx +++ b/svx/source/cui/page.hxx diff --git a/svx/source/dialog/page.src b/svx/source/cui/page.src index 697f1416b47c..697f1416b47c 100644 --- a/svx/source/dialog/page.src +++ b/svx/source/cui/page.src diff --git a/svx/source/dialog/paragrph.cxx b/svx/source/cui/paragrph.cxx index b1ed23edc0e9..b1ed23edc0e9 100644 --- a/svx/source/dialog/paragrph.cxx +++ b/svx/source/cui/paragrph.cxx diff --git a/svx/source/dialog/paragrph.hrc b/svx/source/cui/paragrph.hrc index 6b0b835b07e3..6b0b835b07e3 100644 --- a/svx/source/dialog/paragrph.hrc +++ b/svx/source/cui/paragrph.hrc diff --git a/svx/source/dialog/paragrph.hxx b/svx/source/cui/paragrph.hxx index c75869747ee2..c75869747ee2 100644 --- a/svx/source/dialog/paragrph.hxx +++ b/svx/source/cui/paragrph.hxx diff --git a/svx/source/dialog/paragrph.src b/svx/source/cui/paragrph.src index 996242dccbda..996242dccbda 100644 --- a/svx/source/dialog/paragrph.src +++ b/svx/source/cui/paragrph.src diff --git a/svx/source/dialog/pastedlg.cxx b/svx/source/cui/pastedlg.cxx index c9ce336448eb..c9ce336448eb 100644 --- a/svx/source/dialog/pastedlg.cxx +++ b/svx/source/cui/pastedlg.cxx diff --git a/svx/source/dialog/pastedlg.hxx b/svx/source/cui/pastedlg.hxx index edbbaf53e6ee..edbbaf53e6ee 100644 --- a/svx/source/dialog/pastedlg.hxx +++ b/svx/source/cui/pastedlg.hxx diff --git a/svx/source/dialog/plfilter.cxx b/svx/source/cui/plfilter.cxx index 882e4e751e0c..882e4e751e0c 100644 --- a/svx/source/dialog/plfilter.cxx +++ b/svx/source/cui/plfilter.cxx diff --git a/svx/source/dialog/postdlg.cxx b/svx/source/cui/postdlg.cxx index 1f4d481f4b8e..1f4d481f4b8e 100644 --- a/svx/source/dialog/postdlg.cxx +++ b/svx/source/cui/postdlg.cxx diff --git a/svx/source/dialog/postdlg.hrc b/svx/source/cui/postdlg.hrc index b2b615647438..b2b615647438 100644 --- a/svx/source/dialog/postdlg.hrc +++ b/svx/source/cui/postdlg.hrc diff --git a/svx/source/dialog/postdlg.hxx b/svx/source/cui/postdlg.hxx index 9c4f2551c09b..9c4f2551c09b 100644 --- a/svx/source/dialog/postdlg.hxx +++ b/svx/source/cui/postdlg.hxx diff --git a/svx/source/dialog/postdlg.src b/svx/source/cui/postdlg.src index 23dbef26e0a8..23dbef26e0a8 100644 --- a/svx/source/dialog/postdlg.src +++ b/svx/source/cui/postdlg.src diff --git a/svx/source/dialog/readonlyimage.cxx b/svx/source/cui/readonlyimage.cxx index a43a87d820c8..a43a87d820c8 100644 --- a/svx/source/dialog/readonlyimage.cxx +++ b/svx/source/cui/readonlyimage.cxx diff --git a/svx/source/dialog/readonlyimage.hxx b/svx/source/cui/readonlyimage.hxx index 10e44989e9e9..10e44989e9e9 100644 --- a/svx/source/dialog/readonlyimage.hxx +++ b/svx/source/cui/readonlyimage.hxx diff --git a/svx/source/dialog/readonlyimage.src b/svx/source/cui/readonlyimage.src index 0f698a833c46..0f698a833c46 100644 --- a/svx/source/dialog/readonlyimage.src +++ b/svx/source/cui/readonlyimage.src diff --git a/svx/source/dialog/scriptdlg.cxx b/svx/source/cui/scriptdlg.cxx index 9c5e9277b3b2..9c5e9277b3b2 100644 --- a/svx/source/dialog/scriptdlg.cxx +++ b/svx/source/cui/scriptdlg.cxx diff --git a/svx/source/dialog/scriptdlg.hrc b/svx/source/cui/scriptdlg.hrc index f4a7a75a4416..f4a7a75a4416 100644 --- a/svx/source/dialog/scriptdlg.hrc +++ b/svx/source/cui/scriptdlg.hrc diff --git a/svx/source/dialog/scriptdlg.hxx b/svx/source/cui/scriptdlg.hxx index 74b2d2d7e5e6..0cb2a6d4fb5d 100644 --- a/svx/source/dialog/scriptdlg.hxx +++ b/svx/source/cui/scriptdlg.hxx @@ -45,7 +45,6 @@ #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/script/browse/XBrowseNode.hpp> #include <com/sun/star/frame/XModel.hpp> -#include "svx/svxdllapi.h" #include <hash_map> @@ -172,7 +171,7 @@ public: void setLoaded() { loaded=true; } }; -class SVX_DLLPUBLIC SvxScriptOrgDialog : public SfxModalDialog +class SvxScriptOrgDialog : public SfxModalDialog { protected: FixedText aScriptsTxt; @@ -231,7 +230,7 @@ public: //DECL_LINK( ActivatePageHdl, TabControl * ); }; -class SVX_DLLPUBLIC SvxScriptErrorDialog : public VclAbstractDialog +class SvxScriptErrorDialog : public VclAbstractDialog { private: diff --git a/svx/source/dialog/scriptdlg.src b/svx/source/cui/scriptdlg.src index 3c5b2739abfa..3c5b2739abfa 100644 --- a/svx/source/dialog/scriptdlg.src +++ b/svx/source/cui/scriptdlg.src diff --git a/svx/source/dialog/sdbcdriverenum.cxx b/svx/source/cui/sdbcdriverenum.cxx index d8be80bea651..d8be80bea651 100644 --- a/svx/source/dialog/sdbcdriverenum.cxx +++ b/svx/source/cui/sdbcdriverenum.cxx diff --git a/svx/source/dialog/sdbcdriverenum.hxx b/svx/source/cui/sdbcdriverenum.hxx index eaee591b22f3..eaee591b22f3 100644 --- a/svx/source/dialog/sdbcdriverenum.hxx +++ b/svx/source/cui/sdbcdriverenum.hxx diff --git a/svx/source/dialog/sdrcelldlg.cxx b/svx/source/cui/sdrcelldlg.cxx index e543402330bd..e543402330bd 100644 --- a/svx/source/dialog/sdrcelldlg.cxx +++ b/svx/source/cui/sdrcelldlg.cxx diff --git a/svx/source/dialog/sdrcelldlg.hxx b/svx/source/cui/sdrcelldlg.hxx index b89c9ef21e8a..b89c9ef21e8a 100644 --- a/svx/source/dialog/sdrcelldlg.hxx +++ b/svx/source/cui/sdrcelldlg.hxx diff --git a/svx/source/dialog/sdrcelldlg.src b/svx/source/cui/sdrcelldlg.src index 71374302a276..71374302a276 100644 --- a/svx/source/dialog/sdrcelldlg.src +++ b/svx/source/cui/sdrcelldlg.src diff --git a/svx/source/dialog/securityoptions.cxx b/svx/source/cui/securityoptions.cxx index e033b9010868..e033b9010868 100644 --- a/svx/source/dialog/securityoptions.cxx +++ b/svx/source/cui/securityoptions.cxx diff --git a/svx/source/dialog/securityoptions.hrc b/svx/source/cui/securityoptions.hrc index c0358d5f151b..c0358d5f151b 100644 --- a/svx/source/dialog/securityoptions.hrc +++ b/svx/source/cui/securityoptions.hrc diff --git a/svx/source/dialog/securityoptions.hxx b/svx/source/cui/securityoptions.hxx index 0e78e328edd8..0e78e328edd8 100644 --- a/svx/source/dialog/securityoptions.hxx +++ b/svx/source/cui/securityoptions.hxx diff --git a/svx/source/dialog/securityoptions.src b/svx/source/cui/securityoptions.src index 7f921bea1dd2..7f921bea1dd2 100644 --- a/svx/source/dialog/securityoptions.src +++ b/svx/source/cui/securityoptions.src diff --git a/svx/source/dialog/selector.cxx b/svx/source/cui/selector.cxx index 39e22e5ab9f2..39e22e5ab9f2 100644 --- a/svx/source/dialog/selector.cxx +++ b/svx/source/cui/selector.cxx diff --git a/svx/source/dialog/selector.hrc b/svx/source/cui/selector.hrc index 68c87b493593..68c87b493593 100644 --- a/svx/source/dialog/selector.hrc +++ b/svx/source/cui/selector.hrc diff --git a/svx/source/dialog/selector.hxx b/svx/source/cui/selector.hxx index 2044fddad88a..fe6152131c9d 100644 --- a/svx/source/dialog/selector.hxx +++ b/svx/source/cui/selector.hxx @@ -40,7 +40,6 @@ #include <com/sun/star/frame/XFrame.hpp> #include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/script/browse/XBrowseNode.hpp> -#include "svx/svxdllapi.h" #define _SVSTDARR_USHORTS #define _SVSTDARR_STRINGSDTOR @@ -95,7 +94,6 @@ struct SvxGroupInfo_Impl typedef SvxGroupInfo_Impl* SvxGroupInfoPtr; SV_DECL_PTRARR_DEL(SvxGroupInfoArr_Impl, SvxGroupInfoPtr, 5, 5) -DECL_2BYTEARRAY(USHORTArr, USHORT, 10, 10) class ImageProvider { @@ -200,7 +198,7 @@ public: { m_pImageProvider = provider; } }; -class SVX_DLLPUBLIC SvxScriptSelectorDialog : public ModelessDialog +class SvxScriptSelectorDialog : public ModelessDialog { FixedText aDialogDescription; FixedText aGroupText; diff --git a/svx/source/dialog/selector.src b/svx/source/cui/selector.src index de972cdebc01..de972cdebc01 100644 --- a/svx/source/dialog/selector.src +++ b/svx/source/cui/selector.src diff --git a/svx/source/dialog/showcols.cxx b/svx/source/cui/showcols.cxx index bf225508310e..bf225508310e 100644 --- a/svx/source/dialog/showcols.cxx +++ b/svx/source/cui/showcols.cxx diff --git a/svx/source/dialog/showcols.hxx b/svx/source/cui/showcols.hxx index fd64abf36e2c..fd64abf36e2c 100644 --- a/svx/source/dialog/showcols.hxx +++ b/svx/source/cui/showcols.hxx diff --git a/svx/source/dialog/splitcelldlg.cxx b/svx/source/cui/splitcelldlg.cxx index 82f3b1c9dff5..82f3b1c9dff5 100644 --- a/svx/source/dialog/splitcelldlg.cxx +++ b/svx/source/cui/splitcelldlg.cxx diff --git a/svx/source/dialog/splitcelldlg.hrc b/svx/source/cui/splitcelldlg.hrc index cab8b4ed02ad..cab8b4ed02ad 100644 --- a/svx/source/dialog/splitcelldlg.hrc +++ b/svx/source/cui/splitcelldlg.hrc diff --git a/svx/source/dialog/splitcelldlg.hxx b/svx/source/cui/splitcelldlg.hxx index e325e25a8284..e325e25a8284 100644 --- a/svx/source/dialog/splitcelldlg.hxx +++ b/svx/source/cui/splitcelldlg.hxx diff --git a/svx/source/dialog/splitcelldlg.src b/svx/source/cui/splitcelldlg.src index 17285cecd05f..17285cecd05f 100644 --- a/svx/source/dialog/splitcelldlg.src +++ b/svx/source/cui/splitcelldlg.src diff --git a/svx/source/dialog/srchxtra.cxx b/svx/source/cui/srchxtra.cxx index 24966c6d4f5d..24966c6d4f5d 100644 --- a/svx/source/dialog/srchxtra.cxx +++ b/svx/source/cui/srchxtra.cxx diff --git a/svx/source/dialog/srchxtra.hrc b/svx/source/cui/srchxtra.hrc index 870303efd72c..870303efd72c 100644 --- a/svx/source/dialog/srchxtra.hrc +++ b/svx/source/cui/srchxtra.hrc diff --git a/svx/source/dialog/srchxtra.hxx b/svx/source/cui/srchxtra.hxx index cdbf37b4db66..cdbf37b4db66 100644 --- a/svx/source/dialog/srchxtra.hxx +++ b/svx/source/cui/srchxtra.hxx diff --git a/svx/source/dialog/srchxtra.src b/svx/source/cui/srchxtra.src index 980b952adc76..980b952adc76 100644 --- a/svx/source/dialog/srchxtra.src +++ b/svx/source/cui/srchxtra.src diff --git a/svx/source/dialog/svuidlg.hrc b/svx/source/cui/svuidlg.hrc index b4030391e6b5..b4030391e6b5 100644 --- a/svx/source/dialog/svuidlg.hrc +++ b/svx/source/cui/svuidlg.hrc diff --git a/svx/source/dialog/svuidlg.src b/svx/source/cui/svuidlg.src index a00a09e919e6..a00a09e919e6 100644 --- a/svx/source/dialog/svuidlg.src +++ b/svx/source/cui/svuidlg.src diff --git a/svx/source/dialog/swpossizetabpage.cxx b/svx/source/cui/swpossizetabpage.cxx index 685fc03145f2..685fc03145f2 100644 --- a/svx/source/dialog/swpossizetabpage.cxx +++ b/svx/source/cui/swpossizetabpage.cxx diff --git a/svx/source/dialog/swpossizetabpage.hrc b/svx/source/cui/swpossizetabpage.hrc index af4a081cb045..af4a081cb045 100644 --- a/svx/source/dialog/swpossizetabpage.hrc +++ b/svx/source/cui/swpossizetabpage.hrc diff --git a/svx/source/dialog/swpossizetabpage.hxx b/svx/source/cui/swpossizetabpage.hxx index e6458c27fb6c..e6458c27fb6c 100644 --- a/svx/source/dialog/swpossizetabpage.hxx +++ b/svx/source/cui/swpossizetabpage.hxx diff --git a/svx/source/dialog/swpossizetabpage.src b/svx/source/cui/swpossizetabpage.src index ee8bac14f688..ee8bac14f688 100644 --- a/svx/source/dialog/swpossizetabpage.src +++ b/svx/source/cui/swpossizetabpage.src diff --git a/svx/source/dialog/tabarea.cxx b/svx/source/cui/tabarea.cxx index 219009eb15a1..219009eb15a1 100644 --- a/svx/source/dialog/tabarea.cxx +++ b/svx/source/cui/tabarea.cxx diff --git a/svx/source/dialog/tabarea.hrc b/svx/source/cui/tabarea.hrc index c79e52d82380..c79e52d82380 100644 --- a/svx/source/dialog/tabarea.hrc +++ b/svx/source/cui/tabarea.hrc diff --git a/svx/source/dialog/tabarea.src b/svx/source/cui/tabarea.src index 877d1c5799fd..877d1c5799fd 100644 --- a/svx/source/dialog/tabarea.src +++ b/svx/source/cui/tabarea.src diff --git a/svx/source/dialog/tabline.cxx b/svx/source/cui/tabline.cxx index 456842f93171..456842f93171 100644 --- a/svx/source/dialog/tabline.cxx +++ b/svx/source/cui/tabline.cxx diff --git a/svx/source/dialog/tabline.hrc b/svx/source/cui/tabline.hrc index c1e884ad4ab3..c1e884ad4ab3 100644 --- a/svx/source/dialog/tabline.hrc +++ b/svx/source/cui/tabline.hrc diff --git a/svx/source/dialog/tabline.src b/svx/source/cui/tabline.src index 55e50c0e78b4..55e50c0e78b4 100644 --- a/svx/source/dialog/tabline.src +++ b/svx/source/cui/tabline.src diff --git a/svx/source/dialog/tabstpge.cxx b/svx/source/cui/tabstpge.cxx index 991e809827ea..991e809827ea 100644 --- a/svx/source/dialog/tabstpge.cxx +++ b/svx/source/cui/tabstpge.cxx diff --git a/svx/source/dialog/tabstpge.hrc b/svx/source/cui/tabstpge.hrc index 60752fa70109..60752fa70109 100644 --- a/svx/source/dialog/tabstpge.hrc +++ b/svx/source/cui/tabstpge.hrc diff --git a/svx/source/dialog/tabstpge.hxx b/svx/source/cui/tabstpge.hxx index 945f6acbb9e4..945f6acbb9e4 100644 --- a/svx/source/dialog/tabstpge.hxx +++ b/svx/source/cui/tabstpge.hxx diff --git a/svx/source/dialog/tabstpge.src b/svx/source/cui/tabstpge.src index 2b3649ef968f..2b3649ef968f 100644 --- a/svx/source/dialog/tabstpge.src +++ b/svx/source/cui/tabstpge.src diff --git a/svx/source/dialog/textanim.cxx b/svx/source/cui/textanim.cxx index 6251d4c970e1..6251d4c970e1 100644 --- a/svx/source/dialog/textanim.cxx +++ b/svx/source/cui/textanim.cxx diff --git a/svx/source/dialog/textanim.hrc b/svx/source/cui/textanim.hrc index 97d6b7c64525..97d6b7c64525 100644 --- a/svx/source/dialog/textanim.hrc +++ b/svx/source/cui/textanim.hrc diff --git a/svx/source/dialog/textanim.hxx b/svx/source/cui/textanim.hxx index 576bda45450a..576bda45450a 100644 --- a/svx/source/dialog/textanim.hxx +++ b/svx/source/cui/textanim.hxx diff --git a/svx/source/dialog/textanim.src b/svx/source/cui/textanim.src index d9c211a020f5..d9c211a020f5 100644 --- a/svx/source/dialog/textanim.src +++ b/svx/source/cui/textanim.src diff --git a/svx/source/dialog/textattr.cxx b/svx/source/cui/textattr.cxx index a7eb3069026a..a7eb3069026a 100644 --- a/svx/source/dialog/textattr.cxx +++ b/svx/source/cui/textattr.cxx diff --git a/svx/source/dialog/textattr.hrc b/svx/source/cui/textattr.hrc index 5abc50f04250..5abc50f04250 100644 --- a/svx/source/dialog/textattr.hrc +++ b/svx/source/cui/textattr.hrc diff --git a/svx/source/dialog/textattr.hxx b/svx/source/cui/textattr.hxx index d2e8d795653f..d2e8d795653f 100644 --- a/svx/source/dialog/textattr.hxx +++ b/svx/source/cui/textattr.hxx diff --git a/svx/source/dialog/textattr.src b/svx/source/cui/textattr.src index d0d22044bb51..d0d22044bb51 100644 --- a/svx/source/dialog/textattr.src +++ b/svx/source/cui/textattr.src diff --git a/svx/source/dialog/tparea.cxx b/svx/source/cui/tparea.cxx index 9240df455511..720de9cb00ef 100644 --- a/svx/source/dialog/tparea.cxx +++ b/svx/source/cui/tparea.cxx @@ -31,6 +31,10 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" +#ifdef SVX_DLLIMPLEMENTATION +#undef SVX_DLLIMPLEMENTATION +#endif + // include --------------------------------------------------------------- #include <tools/shl.hxx> #include <tools/urlobj.hxx> @@ -48,18 +52,10 @@ #include <svx/dialogs.hrc> #include "tabarea.hrc" #include "dlgname.hrc" - - - - - - #include <svx/xflbckit.hxx> - #include <svx/svdattr.hxx> #include <svx/xtable.hxx> #include <svx/xlineit0.hxx> - #include "drawitem.hxx" #include "cuitabarea.hxx" #include "dlgname.hxx" diff --git a/svx/source/dialog/tpbitmap.cxx b/svx/source/cui/tpbitmap.cxx index 47a516e65f3b..47a516e65f3b 100644 --- a/svx/source/dialog/tpbitmap.cxx +++ b/svx/source/cui/tpbitmap.cxx diff --git a/svx/source/dialog/tpcolor.cxx b/svx/source/cui/tpcolor.cxx index 3a7399ae073d..3a7399ae073d 100644 --- a/svx/source/dialog/tpcolor.cxx +++ b/svx/source/cui/tpcolor.cxx diff --git a/svx/source/dialog/tpgradnt.cxx b/svx/source/cui/tpgradnt.cxx index 2624738baaa4..2624738baaa4 100644 --- a/svx/source/dialog/tpgradnt.cxx +++ b/svx/source/cui/tpgradnt.cxx diff --git a/svx/source/dialog/tphatch.cxx b/svx/source/cui/tphatch.cxx index d060031abea2..d060031abea2 100644 --- a/svx/source/dialog/tphatch.cxx +++ b/svx/source/cui/tphatch.cxx diff --git a/svx/source/dialog/tpline.cxx b/svx/source/cui/tpline.cxx index edbf7247fd47..edbf7247fd47 100644 --- a/svx/source/dialog/tpline.cxx +++ b/svx/source/cui/tpline.cxx diff --git a/svx/source/dialog/tplnedef.cxx b/svx/source/cui/tplnedef.cxx index 7b22fe175d16..7b22fe175d16 100644 --- a/svx/source/dialog/tplnedef.cxx +++ b/svx/source/cui/tplnedef.cxx diff --git a/svx/source/dialog/tplneend.cxx b/svx/source/cui/tplneend.cxx index c83a88956273..c83a88956273 100644 --- a/svx/source/dialog/tplneend.cxx +++ b/svx/source/cui/tplneend.cxx diff --git a/svx/source/dialog/tpshadow.cxx b/svx/source/cui/tpshadow.cxx index 4515f1f39a31..4515f1f39a31 100644 --- a/svx/source/dialog/tpshadow.cxx +++ b/svx/source/cui/tpshadow.cxx diff --git a/svx/source/dialog/transfrm.cxx b/svx/source/cui/transfrm.cxx index ba1bee46e1a1..ba1bee46e1a1 100644 --- a/svx/source/dialog/transfrm.cxx +++ b/svx/source/cui/transfrm.cxx diff --git a/svx/source/dialog/transfrm.hrc b/svx/source/cui/transfrm.hrc index a49a8c3f3985..a49a8c3f3985 100644 --- a/svx/source/dialog/transfrm.hrc +++ b/svx/source/cui/transfrm.hrc diff --git a/svx/source/dialog/transfrm.hxx b/svx/source/cui/transfrm.hxx index 3a5abeedf4a1..3a5abeedf4a1 100644 --- a/svx/source/dialog/transfrm.hxx +++ b/svx/source/cui/transfrm.hxx diff --git a/svx/source/dialog/transfrm.src b/svx/source/cui/transfrm.src index 1a64d5962f85..1a64d5962f85 100644 --- a/svx/source/dialog/transfrm.src +++ b/svx/source/cui/transfrm.src diff --git a/svx/source/dialog/treeopt.cxx b/svx/source/cui/treeopt.cxx index 7491b2bb1cc5..7491b2bb1cc5 100644 --- a/svx/source/dialog/treeopt.cxx +++ b/svx/source/cui/treeopt.cxx diff --git a/svx/source/dialog/treeopt.hrc b/svx/source/cui/treeopt.hrc index 7f8fab812dc2..7f8fab812dc2 100644 --- a/svx/source/dialog/treeopt.hrc +++ b/svx/source/cui/treeopt.hrc diff --git a/svx/source/dialog/treeopt.hxx b/svx/source/cui/treeopt.hxx index cce278686b27..cce278686b27 100644 --- a/svx/source/dialog/treeopt.hxx +++ b/svx/source/cui/treeopt.hxx diff --git a/svx/source/dialog/treeopt.src b/svx/source/cui/treeopt.src index 2bf5d0825cdc..2bf5d0825cdc 100644 --- a/svx/source/dialog/treeopt.src +++ b/svx/source/cui/treeopt.src diff --git a/svx/source/dialog/webconninfo.cxx b/svx/source/cui/webconninfo.cxx index 8fdf6a26d2bd..8fdf6a26d2bd 100644 --- a/svx/source/dialog/webconninfo.cxx +++ b/svx/source/cui/webconninfo.cxx diff --git a/svx/source/dialog/webconninfo.hrc b/svx/source/cui/webconninfo.hrc index de040b302d89..de040b302d89 100644 --- a/svx/source/dialog/webconninfo.hrc +++ b/svx/source/cui/webconninfo.hrc diff --git a/svx/source/dialog/webconninfo.hxx b/svx/source/cui/webconninfo.hxx index 775d5072393c..775d5072393c 100644 --- a/svx/source/dialog/webconninfo.hxx +++ b/svx/source/cui/webconninfo.hxx diff --git a/svx/source/dialog/webconninfo.src b/svx/source/cui/webconninfo.src index 328478c56e83..328478c56e83 100644 --- a/svx/source/dialog/webconninfo.src +++ b/svx/source/cui/webconninfo.src diff --git a/svx/source/dialog/winpluginlib.cpp b/svx/source/cui/winpluginlib.cpp index 0b1fced85b40..0b1fced85b40 100644 --- a/svx/source/dialog/winpluginlib.cpp +++ b/svx/source/cui/winpluginlib.cpp diff --git a/svx/source/dialog/zoom.cxx b/svx/source/cui/zoom.cxx index e97448999564..e97448999564 100644 --- a/svx/source/dialog/zoom.cxx +++ b/svx/source/cui/zoom.cxx diff --git a/svx/source/dialog/zoom.hrc b/svx/source/cui/zoom.hrc index 70e488c2893e..70e488c2893e 100644 --- a/svx/source/dialog/zoom.hrc +++ b/svx/source/cui/zoom.hrc diff --git a/svx/source/dialog/zoom.hxx b/svx/source/cui/zoom.hxx index d031da97bc55..d031da97bc55 100644 --- a/svx/source/dialog/zoom.hxx +++ b/svx/source/cui/zoom.hxx diff --git a/svx/source/dialog/zoom.src b/svx/source/cui/zoom.src index dca32260ab8d..dca32260ab8d 100644 --- a/svx/source/dialog/zoom.src +++ b/svx/source/cui/zoom.src diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx index 6b8ee4e467c2..9ef7073971b6 100644 --- a/svx/source/dialog/charmap.cxx +++ b/svx/source/dialog/charmap.cxx @@ -36,40 +36,33 @@ #include <stdio.h> #define _SVX_CHARMAP_CXX_ -#include <tools/shl.hxx> -#include <tools/debug.hxx> -#include <vcl/sound.hxx> #include <vcl/svapp.hxx> -#ifndef _SV_BUTTON_HXX -#include <vcl/button.hxx> -#endif -#include <vcl/fixed.hxx> -#include <vcl/lstbox.hxx> -#include <vcl/edit.hxx> #include <svtools/colorcfg.hxx> #include <rtl/textenc.h> #include <svx/ucsubset.hxx> #include <svx/dialogs.hrc> -#include "charmap.hrc" #include <svx/charmap.hxx> #include <svx/dialmgr.hxx> +#include <svx/svxdlg.hxx> #include "charmapacc.hxx" #include <com/sun/star/accessibility/AccessibleEventObject.hpp> #include <com/sun/star/accessibility/AccessibleEventId.hpp> #include <com/sun/star/accessibility/AccessibleStateType.hpp> #include <comphelper/types.hxx> +#include <svtools/itemset.hxx> #include "rtl/ustrbuf.hxx" using namespace ::com::sun::star::accessibility; using namespace ::com::sun::star::uno; +using namespace ::com::sun::star; // ----------------------------------------------------------------------- -sal_uInt32& getSelectedChar() +sal_uInt32& SvxShowCharSet::getSelectedChar() { static sal_uInt32 cSelectedChar = ' '; // keeps selected character over app livetime return cSelectedChar; @@ -715,393 +708,6 @@ sal_Int32 SvxShowCharSet::getMaxCharCount() const return maFontCharMap.GetCharCount(); } -// class SvxShowText ===================================================== - -SvxShowText::SvxShowText( Window* pParent, const ResId& rResId, BOOL bCenter ) -: Control( pParent, rResId ), - mbCenter( bCenter) -{} - -// ----------------------------------------------------------------------- - -void SvxShowText::Paint( const Rectangle& ) -{ - Color aTextCol = GetTextColor(); - - const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); - const Color aWindowTextColor( rStyleSettings.GetDialogTextColor() ); - SetTextColor( aWindowTextColor ); - - const String aText = GetText(); - const Size aSize = GetOutputSizePixel(); - Point aPoint( 2, mnY ); - - // adjust position using ink boundary if possible - Rectangle aBoundRect; - if( !GetTextBoundRect( aBoundRect, aText ) || aBoundRect.IsEmpty() ) - aPoint.X() = (aSize.Width() - GetTextWidth( aText )) / 2; - else - { - // adjust position before it gets out of bounds - aBoundRect += aPoint; - - // shift back vertically if needed - int nYLDelta = aBoundRect.Top(); - int nYHDelta = aSize.Height() - aBoundRect.Bottom(); - if( nYLDelta <= 0 ) - aPoint.Y() -= nYLDelta - 1; - else if( nYHDelta <= 0 ) - aPoint.Y() += nYHDelta - 1; - - if( mbCenter ) - { - // move glyph to middle of cell - aPoint.X() = -aBoundRect.Left() - + (aSize.Width() - aBoundRect.GetWidth()) / 2; - } - else - { - // shift back horizontally if needed - int nXLDelta = aBoundRect.Left(); - int nXHDelta = aSize.Width() - aBoundRect.Right(); - if( nXLDelta <= 0 ) - aPoint.X() -= nXLDelta - 1; - else if( nXHDelta <= 0 ) - aPoint.X() += nXHDelta - 1; - } - } - - DrawText( aPoint, aText ); - SetTextColor( aTextCol ); -} - -// ----------------------------------------------------------------------- - -void SvxShowText::SetFont( const Font& rFont ) -{ - long nWinHeight = GetOutputSizePixel().Height(); - Font aFont = rFont; - aFont.SetWeight( WEIGHT_NORMAL ); - aFont.SetAlign( ALIGN_TOP ); - aFont.SetSize( PixelToLogic( Size( 0, nWinHeight/2 ) ) ); - aFont.SetTransparent( TRUE ); - Control::SetFont( aFont ); - mnY = ( nWinHeight - GetTextHeight() ) / 2; - - Invalidate(); -} - -// ----------------------------------------------------------------------- - -void SvxShowText::SetText( const String& rText ) -{ - Control::SetText( rText ); - Invalidate(); -} - -// ----------------------------------------------------------------------- - -SvxShowText::~SvxShowText() -{} - -// class SvxCharacterMap ================================================= - -SvxCharMapData::SvxCharMapData( SfxModalDialog* pDialog, BOOL bOne_, ResMgr* pResContext ) -: mpDialog( pDialog ), - aShowSet ( pDialog, ResId( CT_SHOWSET, *pResContext ) ), - aShowText ( pDialog, ResId( CT_SHOWTEXT, *pResContext ) ), - aOKBtn ( pDialog, ResId( BTN_CHAR_OK, *pResContext ) ), - aCancelBtn ( pDialog, ResId( BTN_CHAR_CANCEL, *pResContext ) ), - aHelpBtn ( pDialog, ResId( BTN_CHAR_HELP, *pResContext ) ), - aDeleteBtn ( pDialog, ResId( BTN_DELETE, *pResContext ) ), - aFontText ( pDialog, ResId( FT_FONT, *pResContext ) ), - aFontLB ( pDialog, ResId( LB_FONT, *pResContext ) ), - aSubsetText ( pDialog, ResId( FT_SUBSET, *pResContext ) ), - aSubsetLB ( pDialog, ResId( LB_SUBSET, *pResContext ) ), - aSymbolText ( pDialog, ResId( FT_SYMBOLE, *pResContext ) ), - aShowChar ( pDialog, ResId( CT_SHOWCHAR, *pResContext ), TRUE ), - aCharCodeText ( pDialog, ResId( FT_CHARCODE, *pResContext ) ), - bOne( bOne_ ), - pSubsetMap( NULL ) -{ - aFont = pDialog->GetFont(); - aFont.SetTransparent( TRUE ); - aFont.SetFamily( FAMILY_DONTKNOW ); - aFont.SetPitch( PITCH_DONTKNOW ); - aFont.SetCharSet( RTL_TEXTENCODING_DONTKNOW ); - - if ( bOne ) - { - Size aDlgSize = pDialog->GetSizePixel(); - pDialog->SetSizePixel( Size( aDlgSize.Width(), - aDlgSize.Height()-aShowText.GetSizePixel().Height() ) ); - aSymbolText.Hide(); - aShowText.Hide(); - aDeleteBtn.Hide(); - } - - String aDefStr( aFont.GetName() ); - String aLastName; - int nCount = mpDialog->GetDevFontCount(); - for ( int i = 0; i < nCount; i++ ) - { - String aFontName( mpDialog->GetDevFont( i ).GetName() ); - if ( aFontName != aLastName ) - { - aLastName = aFontName; - USHORT nPos = aFontLB.InsertEntry( aFontName ); - aFontLB.SetEntryData( nPos, (void*)(ULONG)i ); - } - } - // the font may not be in the list => - // try to find a font name token in list and select found font, - // else select topmost entry - FASTBOOL bFound = (aFontLB.GetEntryPos( aDefStr ) == LISTBOX_ENTRY_NOTFOUND ); - if( !bFound ) - { - for ( xub_StrLen i = 0; i < aDefStr.GetTokenCount(); ++i ) - { - String aToken = aDefStr.GetToken(i); - if ( aFontLB.GetEntryPos( aToken ) != LISTBOX_ENTRY_NOTFOUND ) - { - aDefStr = aToken; - bFound = TRUE; - break; - } - } - } - - if ( bFound ) - aFontLB.SelectEntry( aDefStr ); - else if ( aFontLB.GetEntryCount() ) - aFontLB.SelectEntryPos(0); - FontSelectHdl( &aFontLB ); - - aOKBtn.SetClickHdl( LINK( this, SvxCharMapData, OKHdl ) ); - aFontLB.SetSelectHdl( LINK( this, SvxCharMapData, FontSelectHdl ) ); - aSubsetLB.SetSelectHdl( LINK( this, SvxCharMapData, SubsetSelectHdl ) ); - aShowSet.SetDoubleClickHdl( LINK( this, SvxCharMapData, CharDoubleClickHdl ) ); - aShowSet.SetSelectHdl( LINK( this, SvxCharMapData, CharSelectHdl ) ); - aShowSet.SetHighlightHdl( LINK( this, SvxCharMapData, CharHighlightHdl ) ); - aShowSet.SetPreSelectHdl( LINK( this, SvxCharMapData, CharPreSelectHdl ) ); - aDeleteBtn.SetClickHdl( LINK( this, SvxCharMapData, DeleteHdl ) ); - - - if(getSelectedChar() == ' ') - aOKBtn.Disable(); - else - aOKBtn.Enable(); - - // left align aShowText field - int nLeftEdge = aSymbolText.GetPosPixel().X(); - nLeftEdge += aSymbolText.GetTextWidth( aSymbolText.GetText() ); - Size aNewSize = aShowText.GetOutputSizePixel(); - aShowText.SetPosPixel( Point( nLeftEdge+4, aShowText.GetPosPixel().Y() ) ); -} - -// ----------------------------------------------------------------------- - -void SvxCharMapData::SetCharFont( const Font& rFont ) -{ - // first get the underlying info in order to get font names - // like "Times New Roman;Times" resolved - Font aTmp( mpDialog->GetFontMetric( rFont ) ); - - if ( aFontLB.GetEntryPos( aTmp.GetName() ) == LISTBOX_ENTRY_NOTFOUND ) - return; - - aFontLB.SelectEntry( aTmp.GetName() ); - aFont = aTmp; - FontSelectHdl( &aFontLB ); - - // for compatibility reasons - mpDialog->ModalDialog::SetFont( aFont ); -} - -// ----------------------------------------------------------------------- - -IMPL_LINK( SvxCharMapData, OKHdl, OKButton *, EMPTYARG ) -{ - String aStr = aShowText.GetText(); - - if ( !aStr.Len() ) - { - sal_UCS4 cChar = aShowSet.GetSelectCharacter(); - // using the new UCS4 constructor - rtl::OUString aOUStr( &cChar, 1 ); - aShowText.SetText( aOUStr ); - } - mpDialog->EndDialog( TRUE ); - return 0; -} - -// ----------------------------------------------------------------------- - -IMPL_LINK( SvxCharMapData, FontSelectHdl, ListBox *, EMPTYARG ) -{ - USHORT nPos = aFontLB.GetSelectEntryPos(), - nFont = (USHORT)(ULONG)aFontLB.GetEntryData( nPos ); - aFont = mpDialog->GetDevFont( nFont ); - - // notify children using this font - aShowSet.SetFont( aFont ); - aShowChar.SetFont( aFont ); - aShowText.SetFont( aFont ); - - // right align some fields to aShowSet - int nRightEdge = aShowSet.GetPosPixel().X() + aShowSet.GetOutputSizePixel().Width(); - Size aNewSize = aSubsetLB.GetOutputSizePixel(); - aNewSize.setWidth( nRightEdge - aSubsetLB.GetPosPixel().X() ); - aSubsetLB.SetOutputSizePixel( aNewSize ); - - // setup unicode subset listbar with font specific subsets, - // hide unicode subset listbar for symbol fonts - // TODO: get info from the Font once it provides it - if( pSubsetMap) - delete pSubsetMap; - pSubsetMap = NULL; - - BOOL bNeedSubset = (aFont.GetCharSet() != RTL_TEXTENCODING_SYMBOL); - if( bNeedSubset ) - { - FontCharMap aFontCharMap; - aShowSet.GetFontCharMap( aFontCharMap ); - pSubsetMap = new SubsetMap( &aFontCharMap ); - - // update subset listbox for new font's unicode subsets - aSubsetLB.Clear(); - // TODO: is it worth to improve the stupid linear search? - bool bFirst = true; - const Subset* s; - while( NULL != (s = pSubsetMap->GetNextSubset( bFirst )) ) - { - USHORT nPos_ = aSubsetLB.InsertEntry( s->GetName() ); - aSubsetLB.SetEntryData( nPos_, (void*)s ); - // NOTE: subset must live at least as long as the selected font - if( bFirst ) - aSubsetLB.SelectEntryPos( nPos_ ); - bFirst = false; - } - if( aSubsetLB.GetEntryCount() <= 1 ) - bNeedSubset = FALSE; - } - - aSubsetText.Show( bNeedSubset); - aSubsetLB.Show( bNeedSubset); - - return 0; -} - -// ----------------------------------------------------------------------- - -IMPL_LINK( SvxCharMapData, SubsetSelectHdl, ListBox *, EMPTYARG ) -{ - USHORT nPos = aSubsetLB.GetSelectEntryPos(); - const Subset* pSubset = reinterpret_cast<const Subset*> (aSubsetLB.GetEntryData(nPos)); - if( pSubset ) - { - sal_UCS4 cFirst = pSubset->GetRangeMin(); - aShowSet.SelectCharacter( cFirst ); - } - aSubsetLB.SelectEntryPos( nPos ); - return 0; -} - -// ----------------------------------------------------------------------- - -IMPL_LINK( SvxCharMapData, CharDoubleClickHdl, Control *, EMPTYARG ) -{ - mpDialog->EndDialog( TRUE ); - return 0; -} - -// ----------------------------------------------------------------------- - -IMPL_LINK( SvxCharMapData, CharSelectHdl, Control *, EMPTYARG ) -{ - if ( !bOne ) - { - String aText = aShowText.GetText(); - - if ( aText.Len() == CHARMAP_MAXLEN ) - Sound::Beep( SOUND_WARNING ); - else - { - sal_UCS4 cChar = aShowSet.GetSelectCharacter(); - // using the new UCS4 constructor - rtl::OUString aOUStr( &cChar, 1 ); - aShowText.SetText( aText + aOUStr ); - } - - } - aOKBtn.Enable(); - return 0; -} - -// ----------------------------------------------------------------------- - -IMPL_LINK( SvxCharMapData, CharHighlightHdl, Control *, EMPTYARG ) -{ - String aText; - sal_UCS4 cChar = aShowSet.GetSelectCharacter(); - sal_Bool bSelect = (cChar > 0); - - // show char sample - if ( bSelect ) - { - // using the new UCS4 constructor - aText = rtl::OUString( &cChar, 1 ); - - const Subset* pSubset = NULL; - if( pSubsetMap ) - pSubset = pSubsetMap->GetSubsetByUnicode( cChar ); - if( pSubset ) - aSubsetLB.SelectEntry( pSubset->GetName() ); - else - aSubsetLB.SetNoSelection(); - } - aShowChar.SetText( aText ); - aShowChar.Update(); - - // show char code - if ( bSelect ) - { - char aBuf[32]; - snprintf( aBuf, sizeof(aBuf), "U+%04X", static_cast<unsigned>(cChar) ); - if( cChar < 0x0100 ) - snprintf( aBuf+6, sizeof(aBuf)-6, " (%u)", static_cast<unsigned>(cChar) ); - aText = String::CreateFromAscii( aBuf ); - } - aCharCodeText.SetText( aText ); - - return 0; -} - -// ----------------------------------------------------------------------- - -IMPL_LINK( SvxCharMapData, CharPreSelectHdl, Control *, EMPTYARG ) -{ - // adjust subset selection - if( pSubsetMap ) - { - sal_UCS4 cChar = aShowSet.GetSelectCharacter(); - const Subset* pSubset = pSubsetMap->GetSubsetByUnicode( cChar ); - if( pSubset ) - aSubsetLB.SelectEntry( pSubset->GetName() ); - } - - aOKBtn.Enable(); - return 0; -} - -// ----------------------------------------------------------------------- - -IMPL_LINK( SvxCharMapData, DeleteHdl, PushButton *, EMPTYARG ) -{ - aShowText.SetText( String() ); - aOKBtn.Disable(); - return 0; -} // class SubsetMap ======================================================= // TODO: should be moved into Font Attributes stuff @@ -1288,4 +894,3 @@ void SubsetMap::ApplyCharMap( const FontCharMap* pFontCharMap ) maSubsets.erase( it ); } } - diff --git a/svx/source/dialog/cuicharmap.cxx b/svx/source/dialog/cuicharmap.cxx deleted file mode 100644 index 4e386d09b4bc..000000000000 --- a/svx/source/dialog/cuicharmap.cxx +++ /dev/null @@ -1,136 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: cuicharmap.cxx,v $ - * $Revision: 1.10 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_svx.hxx" - -#ifdef SVX_DLLIMPLEMENTATION -#undef SVX_DLLIMPLEMENTATION -#endif - -// include --------------------------------------------------------------- - -#include <stdio.h> - -#define _CUI_CHARMAP_CXX_ -#include <tools/shl.hxx> -#include <tools/debug.hxx> -#include <vcl/sound.hxx> -#include <vcl/svapp.hxx> -#ifndef _SV_BUTTON_HXX -#include <vcl/button.hxx> -#endif -#include <vcl/fixed.hxx> -#include <vcl/lstbox.hxx> -#include <vcl/edit.hxx> -#include <svtools/colorcfg.hxx> - -#include <rtl/textenc.h> -#include <svx/ucsubset.hxx> - -#include <svx/dialogs.hrc> -#include "charmap.hrc" -#include <svx/charmap.hxx> //add CHINA001 -#include <svx/dialmgr.hxx> -#include "cuicharmap.hxx" -//CHINA001 #include "charmapacc.hxx" -//CHINA001 #ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLEEVENTOBJECT_HPP_ -//CHINA001 #include <com/sun/star/accessibility/AccessibleEventObject.hpp> -//CHINA001 #endif -//CHINA001 #ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLEEVENTID_HPP_ -//CHINA001 #include <com/sun/star/accessibility/AccessibleEventId.hpp> -//CHINA001 #endif -//CHINA001 #ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLESTATETYPE_HPP_ -//CHINA001 #include <com/sun/star/accessibility/AccessibleStateType.hpp> -//CHINA001 #endif -//CHINA001 #ifndef _COMPHELPER_TYPES_HXX_ -//CHINA001 #include <comphelper/types.hxx> -//CHINA001 #endif -//CHINA001 -//CHINA001 using namespace ::com::sun::star::accessibility; -//CHINA001 using namespace ::com::sun::star::uno; - -// class SvxCharacterMap ================================================= - -SvxCharacterMap::SvxCharacterMap( Window* pParent, BOOL bOne ) : - SfxModalDialog( pParent, SVX_RES( RID_SVXDLG_CHARMAP ) ), - mpCharMapData( new SvxCharMapData( this, bOne, &DIALOG_MGR() ) ) -{ - FreeResource(); -} - -// ----------------------------------------------------------------------- - -SvxCharacterMap::~SvxCharacterMap() -{ - delete mpCharMapData; -} - -// ----------------------------------------------------------------------- - -const Font& SvxCharacterMap::GetCharFont() const -{ - return mpCharMapData->aFont; -} - -// ----------------------------------------------------------------------- - -void SvxCharacterMap::SetChar( sal_UCS4 c ) -{ - mpCharMapData->aShowSet.SelectCharacter( c ); -} - -// ----------------------------------------------------------------------- - -sal_UCS4 SvxCharacterMap::GetChar() const -{ - return mpCharMapData->aShowSet.GetSelectCharacter(); -} - -// ----------------------------------------------------------------------- - -String SvxCharacterMap::GetCharacters() const -{ - return mpCharMapData->aShowText.GetText(); -} - - -// ----------------------------------------------------------------------- - -void SvxCharacterMap::DisableFontSelection() -{ - mpCharMapData->aFontText.Disable(); - mpCharMapData->aFontLB.Disable(); -} -void SvxCharacterMap::SetCharFont( const Font& rFont ) -{ - mpCharMapData->SetCharFont( rFont ); -} - diff --git a/svx/source/dialog/databaseregistrationui.cxx b/svx/source/dialog/databaseregistrationui.cxx index 3254f5ec7b8b..7012dab1e89c 100644 --- a/svx/source/dialog/databaseregistrationui.cxx +++ b/svx/source/dialog/databaseregistrationui.cxx @@ -42,7 +42,7 @@ #ifndef _SVX_DIALOGS_HRC #include <svx/dialogs.hrc> #endif -#include "connpooloptions.hxx" +//#include "connpooloptions.hxx" // === /includes (project) =============================================== // === includes (global) ================================================= @@ -60,9 +60,9 @@ namespace svx SfxItemSet aRegistrationItems( SFX_APP()->GetPool(), SID_SB_DB_REGISTER, SID_SB_DB_REGISTER, 0 ); SvxAbstractDialogFactory* pDialogFactory = SvxAbstractDialogFactory::Create(); - ::std::auto_ptr< AbstractSfxSingleTabDialog > pDialog; + ::std::auto_ptr< SfxAbstractDialog > pDialog; if ( pDialogFactory ) - pDialog.reset( pDialogFactory->CreateSfxSingleTabDialog( _parentWindow, aRegistrationItems, NULL, RID_SFXPAGE_DBREGISTER ) ); + pDialog.reset( pDialogFactory->CreateSfxDialog( _parentWindow, aRegistrationItems, NULL, RID_SFXPAGE_DBREGISTER ) ); if ( pDialog.get() ) nResult = pDialog->Execute(); diff --git a/svx/source/dialog/grfflt.cxx b/svx/source/dialog/grfflt.cxx index 355013bc4a10..24f9d805a502 100644 --- a/svx/source/dialog/grfflt.cxx +++ b/svx/source/dialog/grfflt.cxx @@ -41,7 +41,7 @@ #include <svx/dialmgr.hxx> #include <svx/grfflt.hxx> -#include "grfflt.hrc" +//#include "grfflt.hrc" #include <svx/dialogs.hrc> #include <svx/svxdlg.hxx> //CHINA001 diff --git a/svx/source/dialog/hyperdlg.cxx b/svx/source/dialog/hyperdlg.cxx index 032ccb385cd9..d17a24a37e22 100644 --- a/svx/source/dialog/hyperdlg.cxx +++ b/svx/source/dialog/hyperdlg.cxx @@ -34,12 +34,10 @@ // include --------------------------------------------------------------- #include <vcl/settings.hxx> #include <svtools/viewoptions.hxx> -#include "cuihyperdlg.hxx" //CHINA001 #include "hyperdlg.hxx" #include <svx/svxdlg.hxx> //CHINA001 - #include <sfx2/app.hxx> - +#include <sfx2/sfxsids.hrc> #include "hyperdlg.hrc" diff --git a/svx/source/dialog/imapdlg.hrc b/svx/source/dialog/imapdlg.hrc index 3743d0e41e9e..c23545fb9b28 100644 --- a/svx/source/dialog/imapdlg.hrc +++ b/svx/source/dialog/imapdlg.hrc @@ -92,28 +92,6 @@ #define MN_ACTIVATE 9 #define MN_MACRO 10 - -/******************************************************************************/ - - -#define RID_SVXDLG_IMAPURL (RID_SVX_IMAPDLG_START + 2) - -#define FT_URLDESCRIPTION 1 -#define FT_URL1 2 -#define FT_TARGET 3 -#define FT_NAME 4 -#define FT_DESCRIPTION 5 -#define EDT_URLDESCRIPTION 1 -#define EDT_URL 2 -#define EDT_NAME 3 -#define EDT_DESCRIPTION 4 -#define BTN_HELP1 1 -#define BTN_OK1 2 -#define BTN_CANCEL1 3 -#define FL_URL 1 -#define CBB_TARGETS 1 - - /******************************************************************************/ diff --git a/svx/source/dialog/imapdlg.src b/svx/source/dialog/imapdlg.src index 9d9d99b25548..e15d6e466f4c 100644 --- a/svx/source/dialog/imapdlg.src +++ b/svx/source/dialog/imapdlg.src @@ -354,124 +354,8 @@ Menu RID_SVXMN_IMAP }; }; }; -/******************************************************************************/ -ModalDialog RID_SVXDLG_IMAPURL -{ - SVLook = TRUE ; - OutputSize = TRUE ; - Closeable = TRUE ; - Moveable = TRUE ; - Size = MAP_APPFONT ( 214 , 188 ) ; - Text [ en-US ] = "Properties" ; - - FixedText FT_URL1 - { - Pos = MAP_APPFONT ( 6 , 6 ) ; - Size = MAP_APPFONT ( 202 , 8 ) ; - Text [ en-US ] = "~URL" ; - }; - Edit EDT_URL - { - Border = TRUE ; - TabStop = TRUE ; - Left = TRUE ; - Pos = MAP_APPFONT ( 6 , 17 ) ; - Size = MAP_APPFONT ( 202 , 12 ) ; - }; - - FixedText FT_TARGET - { - Pos = MAP_APPFONT ( 6 , 32 ) ; - Size = MAP_APPFONT ( 202 , 8 ) ; - Text [ en-US ] = "F~rame" ; - }; - ComboBox CBB_TARGETS - { - Border = TRUE ; - Sort = TRUE ; - Pos = MAP_APPFONT ( 6 , 43 ) ; - Size = MAP_APPFONT ( 101 , 50 ) ; - TabStop = TRUE ; - DropDown = TRUE ; - HScroll = TRUE ; - }; - - FixedText FT_NAME - { - Pos = MAP_APPFONT ( 6 , 59 ) ; - Size = MAP_APPFONT ( 202 , 8 ) ; - Text [ en-US ] = "~Name" ; - }; - Edit EDT_NAME - { - Border = TRUE ; - TabStop = TRUE ; - Left = TRUE ; - Pos = MAP_APPFONT ( 6 , 70 ) ; - Size = MAP_APPFONT ( 202 , 12 ) ; - }; - - FixedText FT_URLDESCRIPTION - { - Pos = MAP_APPFONT ( 6 , 85 ) ; - Size = MAP_APPFONT ( 202 , 8 ) ; - Text [ en-US ] = "Alternative ~text" ; - }; - - Edit EDT_URLDESCRIPTION - { - Border = TRUE ; - TabStop = TRUE ; - Left = TRUE ; - Pos = MAP_APPFONT ( 6 , 96 ) ; - Size = MAP_APPFONT ( 202 , 12 ) ; - }; - FixedText FT_DESCRIPTION - { - Pos = MAP_APPFONT ( 6 , 111 ) ; - Size = MAP_APPFONT ( 202 , 8 ) ; - Text [ en-US ] = "~Description" ; - }; - - MultiLineEdit EDT_DESCRIPTION - { - Border = TRUE ; - Pos = MAP_APPFONT ( 6 , 122 ) ; - Size = MAP_APPFONT ( 202 , 34 ) ; - TabStop = TRUE ; - IgnoreTab = TRUE; - VScroll = TRUE; - }; - FixedLine FL_URL - { - Pos = MAP_APPFONT ( 0 , 160 ) ; - Size = MAP_APPFONT ( 214 , 4 ) ; - }; - - // Buttons - HelpButton BTN_HELP1 - { - Pos = MAP_APPFONT ( 6, 168 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - - OKButton BTN_OK1 - { - TabStop = TRUE ; - DefButton = TRUE ; - Pos = MAP_APPFONT ( 107 , 168 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - }; - - CancelButton BTN_CANCEL1 - { - TabStop = TRUE ; - Pos = MAP_APPFONT ( 160 , 168 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - }; -}; +/******************************************************************************/ String STR_IMAPDLG_SAVE { diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx index 162d25937c5f..277a6a9f8372 100644 --- a/svx/source/dialog/imapwnd.cxx +++ b/svx/source/dialog/imapwnd.cxx @@ -35,7 +35,6 @@ #include <vcl/help.hxx> #include <sfx2/sfxsids.hrc> // SID_ATTR_MACROITEM #define _ANIMATION -#include <sfx2/macropg.hxx> #include <svtools/imaprect.hxx> #include <svtools/imapcirc.hxx> #include <svtools/imappoly.hxx> @@ -56,6 +55,7 @@ #include <svtools/urihelper.hxx> #include <svx/xfillit.hxx> #include <svx/xlineit.hxx> +#include <sfx2/evntconf.hxx> #include <sot/formats.hxx> @@ -71,46 +71,6 @@ using ::com::sun::star::uno::Reference; /************************************************************************* |* -|* URLDlg -|* -\************************************************************************/ -/* move to cui //CHINA001 -URLDlg::URLDlg( Window* pWindow, const String& rURL, - const String& rDescription, const String& rTarget, - const String& rName, TargetList& rTargetList ) : - - ModalDialog ( pWindow, SVX_RES( RID_SVXDLG_IMAPURL ) ), - - aFlURL ( this, ResId( FL_URL ) ), - aBtnOk ( this, ResId( BTN_OK ) ), - aBtnCancel ( this, ResId( BTN_CANCEL1 ) ), - aFtURL1 ( this, ResId( FT_URL1 ) ), - aEdtURL ( this, ResId( EDT_URL ) ), - aFtURLDescription ( this, ResId( FT_URLDESCRIPTION ) ), - aEdtURLDescription ( this, ResId( EDT_URLDESCRIPTION ) ), - aFtTarget ( this, ResId( FT_TARGET ) ), - aCbbTargets ( this, ResId( CBB_TARGETS ) ), - aFtName ( this, ResId( FT_NAME ) ), - aEdtName ( this, ResId( EDT_NAME ) ) - -{ - FreeResource(); - - aEdtURL.SetText( rURL ); - aEdtURLDescription.SetText( rDescription ); - aEdtName.SetText( rName ); - - for( String* pStr = rTargetList.First(); pStr; pStr = rTargetList.Next() ) - aCbbTargets.InsertEntry( *pStr ); - - if( !rTarget.Len() ) - aCbbTargets.SetText( String::CreateFromAscii( "_self" ) ); - else - aCbbTargets.SetText( rTarget ); -} -*/ -/************************************************************************* -|* |* |* \************************************************************************/ @@ -859,29 +819,29 @@ void IMapWindow::DoMacroAssign() if ( pSdrObj ) { - SfxItemSet aSet( *pIMapPool, SID_ATTR_MACROITEM, SID_ATTR_MACROITEM ); + SfxItemSet aSet( *pIMapPool, SID_ATTR_MACROITEM, SID_ATTR_MACROITEM, SID_EVENTCONFIG, SID_EVENTCONFIG ); + + SfxEventNamesItem aNamesItem(SID_EVENTCONFIG); + aNamesItem.AddEvent( String::CreateFromAscii( "MouseOver" ), String(), SFX_EVENT_MOUSEOVER_OBJECT ); + aNamesItem.AddEvent( String::CreateFromAscii( "MouseOut" ), String(), SFX_EVENT_MOUSEOUT_OBJECT ); + SvxMacroItem aMacroItem(SID_ATTR_MACROITEM); IMapObject* pIMapObj = GetIMapObj( pSdrObj ); - aMacroItem.SetMacroTable( pIMapObj->GetMacroTable() ); aSet.Put( aMacroItem, SID_ATTR_MACROITEM ); - SfxMacroAssignDlg aMacroDlg( this, mxDocumentFrame, aSet ); - SfxMacroTabPage* pMacroTabPage = (SfxMacroTabPage*) aMacroDlg.GetTabPage(); + SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); + SfxAbstractDialog* pMacroDlg = pFact->CreateSfxDialog( this, aSet, mxDocumentFrame, SID_EVENTCONFIG ); - if ( pMacroTabPage ) + if ( pMacroDlg && pMacroDlg->Execute() == RET_OK ) { - pMacroTabPage->AddEvent( String::CreateFromAscii( "MouseOver" ), SFX_EVENT_MOUSEOVER_OBJECT ); - pMacroTabPage->AddEvent( String::CreateFromAscii( "MouseOut" ), SFX_EVENT_MOUSEOUT_OBJECT ); - - if ( aMacroDlg.Execute() == RET_OK ) - { - const SfxItemSet* pOutSet = aMacroDlg.GetOutputItemSet(); - pIMapObj->SetMacroTable( ((const SvxMacroItem& )pOutSet->Get( SID_ATTR_MACROITEM )).GetMacroTable() ); - pModel->SetChanged( sal_True ); - UpdateInfo( FALSE ); - } + const SfxItemSet* pOutSet = pMacroDlg->GetOutputItemSet(); + pIMapObj->SetMacroTable( ((const SvxMacroItem& )pOutSet->Get( SID_ATTR_MACROITEM )).GetMacroTable() ); + pModel->SetChanged( sal_True ); + UpdateInfo( FALSE ); } + + delete pMacroDlg; } } @@ -902,7 +862,7 @@ void IMapWindow::DoPropertyDialog() if(pFact) { AbstractURLDlg* aDlg = pFact->CreateURLDialog( this, pIMapObj->GetURL(), pIMapObj->GetAltText(), pIMapObj->GetDesc(), - pIMapObj->GetTarget(), pIMapObj->GetName(), aTargetList, RID_SVXDLG_IMAPURL ); + pIMapObj->GetTarget(), pIMapObj->GetName(), aTargetList ); DBG_ASSERT(aDlg, "Dialogdiet fail!"); if ( aDlg->Execute() == RET_OK ) { diff --git a/svx/source/dialog/makefile.mk b/svx/source/dialog/makefile.mk index 87317022111f..04865246a915 100644 --- a/svx/source/dialog/makefile.mk +++ b/svx/source/dialog/makefile.mk @@ -31,7 +31,6 @@ PRJ=..$/.. PRJNAME=svx TARGET=dialogs -LIBTARGET=NO ENABLE_EXCEPTIONS=TRUE # --- Settings ----------------------------------------------------- @@ -39,447 +38,121 @@ ENABLE_EXCEPTIONS=TRUE .INCLUDE : settings.mk .INCLUDE : $(PRJ)$/util$/makefile.pmk +# +.IF "$(GUI)"=="WNT" +CFLAGS+= -DUNICODE -D_UNICODE +.ENDIF + # --- Files -------------------------------------------------------- SRS1NAME=dialogs SRC1FILES = \ - svuidlg.src \ - autocdlg.src \ - connect.src \ + bmpmask.src \ contdlg.src \ ctredlin.src \ - measure.src \ - dstribut.src \ - passwd.src \ - align.src \ - backgrnd.src \ - bbdlg.src \ - bmpmask.src \ - border.src \ - chardlg.src \ - charmap.src \ + dlgctrl.src \ + docrecovery.src \ fontwork.src \ + frmdirlbox.src \ frmsel.src \ - grfpage.src \ hdft.src \ hyperdlg.src \ - hyprlink.src \ - hlmarkwn.src\ hyphen.src \ - iconcdlg.src \ + hyprlink.src \ imapdlg.src \ impgrf.src \ + langbox.src \ language.src \ lingu.src \ - numfmt.src \ - numpages.src \ - page.src \ - paragrph.src \ - postdlg.src \ + passwd.src \ prtqry.src \ - ruler.src \ rubydialog.src\ - SpellDialog.src \ - swframeposstrings.src \ - swpossizetabpage.src \ - scriptdlg.src \ - selector.src \ + ruler.src \ srchdlg.src \ - srchxtra.src \ - tabstpge.src \ - textanim.src \ - textattr.src \ + swframeposstrings.src \ thesdlg.src \ txenctab.src \ - zoom.src \ - dlgctrl.src \ - grfflt.src \ - langbox.src \ - frmdirlbox.src \ - hangulhanjadlg.src \ - commonlingui.src \ - fontsubs.src \ - readonlyimage.src \ - opthtml.src \ - optgdlg.src \ - optmemory.src \ - treeopt.src \ - optfltr.src \ - connpooloptions.src \ - dbregister.src \ - doclinkdialog.src \ - internationaloptions.src \ - macropg.src \ - eventdlg.src \ - cfg.src \ - optjava.src \ - optupdt.src \ - splitcelldlg.src\ - sdrcelldlg.src \ - docrecovery.src \ - securityoptions.src \ - webconninfo.src \ - newtabledlg.src + ucsubset.src SRS2NAME=drawdlgs SRC2FILES = \ - dlgname.src \ sdstring.src \ - tabarea.src \ - tabline.src \ - labdlg.src \ - transfrm.src - -.IF "$(GUI)"=="UNX" -SLOFILES=\ - $(SLO)$/sendreportunx.obj -.ELSE -.IF "$(GUI)"=="WNT" -SLOFILES=\ - $(SLO)$/sendreportw32.obj -NOOPTFILES=\ - $(SLO)$/sendreportw32.obj -.ELSE -SLOFILES=\ - $(SLO)$/sendreportgen.obj -.ENDIF -.ENDIF -SLOFILES+=\ - $(SLO)$/SpellDialogChildWindow.obj \ - $(SLO)$/thesdlg.obj \ - $(SLO)$/rubydialog.obj \ - $(SLO)$/hyphen.obj \ - $(SLO)$/opengrf.obj \ - $(SLO)$/internationaloptions.obj \ - $(SLO)$/optHeaderTabListbox.obj \ +SLOFILES= \ $(SLO)$/charmap.obj \ - $(SLO)$/connpooloptions.obj \ - $(SLO)$/dbregistersettings.obj \ - $(SLO)$/fontsubs.obj \ - $(SLO)$/_bmpmask.obj \ - $(SLO)$/optmemory.obj \ - $(SLO)$/opthtml.obj \ - $(SLO)$/optfltr.obj \ - $(SLO)$/autocdlg.obj \ - $(SLO)$/cuiexp.obj \ - $(SLO)$/dlgfact.obj \ - $(SLO)$/svxdlg.obj \ - $(SLO)$/_contdlg.obj \ - $(SLO)$/iconcdlg.obj \ - $(SLO)$/connect.obj \ + $(SLO)$/checklbx.obj \ $(SLO)$/connctrl.obj \ $(SLO)$/contwnd.obj \ - $(SLO)$/fontlb.obj \ - $(SLO)$/graphctl.obj \ - $(SLO)$/hyperdlg.obj \ - $(SLO)$/hyprlink.obj \ - $(SLO)$/hlinettp.obj \ - $(SLO)$/hlmailtp.obj \ - $(SLO)$/hldoctp.obj \ - $(SLO)$/imapdlg.obj \ - $(SLO)$/imapwnd.obj \ - $(SLO)$/measure.obj \ - $(SLO)$/dstribut.obj \ - $(SLO)$/measctrl.obj \ - $(SLO)$/passwd.obj \ - $(SLO)$/strarray.obj \ - $(SLO)$/align.obj \ - $(SLO)$/backgrnd.obj \ - $(SLO)$/bbdlg.obj \ - $(SLO)$/border.obj \ - $(SLO)$/borderconn.obj \ - $(SLO)$/chardlg.obj \ - $(SLO)$/checklbx.obj \ - $(SLO)$/dialcontrol.obj \ $(SLO)$/ctredlin.obj \ - $(SLO)$/dlgctrl.obj \ + $(SLO)$/databaseregistrationui.obj \ + $(SLO)$/dialcontrol.obj \ + $(SLO)$/dialmgr.obj\ $(SLO)$/dlgctl3d.obj \ - $(SLO)$/dlgname.obj \ + $(SLO)$/dlgctrl.obj \ $(SLO)$/dlgutil.obj \ + $(SLO)$/docrecovery.obj \ $(SLO)$/fntctrl.obj \ + $(SLO)$/fontlb.obj \ $(SLO)$/fontwork.obj \ - $(SLO)$/grfpage.obj \ - $(SLO)$/hdft.obj \ - $(SLO)$/impgrf.obj \ - $(SLO)$/labdlg.obj \ - $(SLO)$/langbox.obj \ - $(SLO)$/wrapfield.obj \ - $(SLO)$/numfmt.obj \ - $(SLO)$/page.obj \ - $(SLO)$/pagectrl.obj \ - $(SLO)$/paragrph.obj \ - $(SLO)$/paraprev.obj \ - $(SLO)$/pfiledlg.obj \ - $(SLO)$/postdlg.obj \ - $(SLO)$/prtqry.obj \ - $(SLO)$/relfld.obj \ - $(SLO)$/rlrcitem.obj \ - $(SLO)$/rulritem.obj \ - $(SLO)$/simptabl.obj \ - $(SLO)$/srchxtra.obj \ - $(SLO)$/srchctrl.obj \ - $(SLO)$/srchdlg.obj \ - $(SLO)$/stddlg.obj \ - $(SLO)$/svxbox.obj \ - $(SLO)$/svxruler.obj \ - $(SLO)$/swpossizetabpage.obj \ - $(SLO)$/tabarea.obj \ - $(SLO)$/tabline.obj \ - $(SLO)$/tabstpge.obj \ - $(SLO)$/textattr.obj \ - $(SLO)$/textanim.obj \ - $(SLO)$/tparea.obj \ - $(SLO)$/tpbitmap.obj \ - $(SLO)$/tpcolor.obj \ - $(SLO)$/tpgradnt.obj \ - $(SLO)$/tphatch.obj \ - $(SLO)$/tpline.obj \ - $(SLO)$/tplneend.obj \ - $(SLO)$/tplnedef.obj \ - $(SLO)$/tpshadow.obj \ - $(SLO)$/transfrm.obj \ - $(SLO)$/orienthelper.obj \ - $(SLO)$/txenctab.obj \ - $(SLO)$/txencbox.obj \ - $(SLO)$/zoom.obj \ - $(SLO)$/grfflt.obj \ - $(SLO)$/frmdirlbox.obj \ - $(SLO)$/commonlingui.obj \ - $(SLO)$/dialmgr.obj \ - $(SLO)$/cuiimapwnd.obj \ - $(SLO)$/cuisrchdlg.obj \ - $(SLO)$/cuitbxform.obj \ - $(SLO)$/cuicharmap.obj \ - $(SLO)$/cuihyperdlg.obj \ - $(SLO)$/cuifmsearch.obj \ - $(SLO)$/cuigrfflt.obj \ - $(SLO)$/multipat.obj \ - $(SLO)$/optcolor.obj \ - $(SLO)$/optjsearch.obj \ - $(SLO)$/optgenrl.obj \ - $(SLO)$/optctl.obj \ - $(SLO)$/svxgrahicitem.obj \ - $(SLO)$/SpellAttrib.obj \ - $(SLO)$/SpellDialog.obj \ - $(SLO)$/swframeposstrings.obj \ - $(SLO)$/swframeexample.obj \ - $(SLO)$/svxbmpnumvalueset.obj \ - $(SLO)$/svxgrahicitem.obj \ - $(SLO)$/frmsel.obj \ - $(SLO)$/framelink.obj \ + $(SLO)$/framelink.obj\ $(SLO)$/framelinkarray.obj \ - $(SLO)$/databaseregistrationui.obj \ - $(SLO)$/radiobtnbox.obj \ - $(SLO)$/cfgchart.obj \ - $(SLO)$/optupdt.obj \ - $(SLO)$/optchart.obj \ - $(SLO)$/optinet2.obj \ - $(SLO)$/securityoptions.obj \ - $(SLO)$/webconninfo.obj \ - $(SLO)$/optgdlg.obj \ - $(SLO)$/optdict.obj \ - $(SLO)$/optaccessibility.obj \ - $(SLO)$/optsave.obj \ - $(SLO)$/optasian.obj \ - $(SLO)$/optpath.obj \ - $(SLO)$/optjava.obj \ - $(SLO)$/optimprove.obj \ - $(SLO)$/optimprove2.obj - -LIB1TARGET= $(SLB)$/$(TARGET).lib - -LIB1OBJFILES= \ - $(SLO)$/fontsubs.obj \ - $(SLO)$/svxdlg.obj \ - $(SLO)$/charmap.obj \ - $(SLO)$/_bmpmask.obj \ + $(SLO)$/frmdirlbox.obj \ $(SLO)$/frmsel.obj \ - $(SLO)$/opengrf.obj \ - $(SLO)$/hyphen.obj \ - $(SLO)$/rubydialog.obj \ - $(SLO)$/thesdlg.obj \ - $(SLO)$/splwrap.obj \ - $(SLO)$/hangulhanja.obj \ - $(SLO)$/_contdlg.obj \ - $(SLO)$/connctrl.obj \ - $(SLO)$/contwnd.obj \ - $(SLO)$/fontlb.obj \ $(SLO)$/graphctl.obj \ + $(SLO)$/grfflt.obj \ + $(SLO)$/hangulhanja.obj \ + $(SLO)$/hdft.obj \ $(SLO)$/hyperdlg.obj \ + $(SLO)$/hyphen.obj \ $(SLO)$/hyprlink.obj \ $(SLO)$/imapdlg.obj \ $(SLO)$/imapwnd.obj \ - $(SLO)$/measctrl.obj \ - $(SLO)$/passwd.obj \ - $(SLO)$/strarray.obj \ - $(SLO)$/borderconn.obj \ - $(SLO)$/checklbx.obj \ - $(SLO)$/dialcontrol.obj \ - $(SLO)$/ctredlin.obj \ - $(SLO)$/dlgctrl.obj \ - $(SLO)$/dlgctl3d.obj \ - $(SLO)$/dlgutil.obj \ - $(SLO)$/docrecovery.obj \ - $(SLO)$/fntctrl.obj \ - $(SLO)$/fontwork.obj \ - $(SLO)$/hdft.obj \ $(SLO)$/impgrf.obj \ $(SLO)$/langbox.obj \ - $(SLO)$/wrapfield.obj \ + $(SLO)$/measctrl.obj \ + $(SLO)$/opengrf.obj \ + $(SLO)$/orienthelper.obj \ $(SLO)$/pagectrl.obj \ $(SLO)$/paraprev.obj \ + $(SLO)$/passwd.obj \ $(SLO)$/pfiledlg.obj \ $(SLO)$/prtqry.obj \ + $(SLO)$/radiobtnbox.obj \ $(SLO)$/relfld.obj \ $(SLO)$/rlrcitem.obj \ + $(SLO)$/rubydialog.obj \ $(SLO)$/rulritem.obj \ - $(SLO)$/scriptdlg.obj \ - $(SLO)$/selector.obj \ $(SLO)$/simptabl.obj \ + $(SLO)$/SpellDialogChildWindow.obj \ + $(SLO)$/splwrap.obj \ $(SLO)$/srchctrl.obj \ $(SLO)$/srchdlg.obj \ $(SLO)$/stddlg.obj \ - $(SLO)$/svxbox.obj \ - $(SLO)$/svxruler.obj \ - $(SLO)$/tparea.obj \ - $(SLO)$/orienthelper.obj \ - $(SLO)$/txenctab.obj \ - $(SLO)$/txencbox.obj \ - $(SLO)$/grfflt.obj \ - $(SLO)$/frmdirlbox.obj \ - $(SLO)$/commonlingui.obj \ - $(SLO)$/SpellDialogChildWindow.obj \ + $(SLO)$/strarray.obj \ $(SLO)$/svxbmpnumvalueset.obj\ - $(SLO)$/dialmgr.obj\ + $(SLO)$/svxbox.obj \ + $(SLO)$/svxdlg.obj \ $(SLO)$/svxgrahicitem.obj \ + $(SLO)$/svxruler.obj \ $(SLO)$/swframeexample.obj \ $(SLO)$/swframeposstrings.obj \ - $(SLO)$/eventdlg.obj \ - $(SLO)$/macropg.obj \ - $(SLO)$/cfg.obj\ - $(SLO)$/framelink.obj\ - $(SLO)$/framelinkarray.obj \ - $(SLO)$/databaseregistrationui.obj \ - $(SLO)$/radiobtnbox.obj + $(SLO)$/thesdlg.obj \ + $(SLO)$/txencbox.obj \ + $(SLO)$/txenctab.obj \ + $(SLO)$/wrapfield.obj \ + $(SLO)$/_bmpmask.obj \ + $(SLO)$/_contdlg.obj .IF "$(GUI)"=="UNX" -LIB1OBJFILES += $(SLO)$/sendreportunx.obj +SLOFILES += $(SLO)$/sendreportunx.obj .ELSE .IF "$(GUI)"=="WNT" -LIB1OBJFILES += $(SLO)$/sendreportw32.obj +SLOFILES += $(SLO)$/sendreportw32.obj .ELSE -LIB1OBJFILES += $(SLO)$/sendreportgen.obj +SLOFILES += $(SLO)$/sendreportgen.obj .ENDIF .ENDIF -LIB2TARGET= $(SLB)$/cui.lib - -LIB2OBJFILES= \ - $(SLO)$/linkdlg.obj \ - $(SLO)$/pastedlg.obj \ - $(SLO)$/plfilter.obj \ - $(SLO)$/insdlg.obj \ - $(SLO)$/optHeaderTabListbox.obj \ - $(SLO)$/sdbcdriverenum.obj \ - $(SLO)$/connpoolsettings.obj \ - $(SLO)$/dbregisterednamesconfig.obj \ - $(SLO)$/dbregistersettings.obj \ - $(SLO)$/dbregister.obj \ - $(SLO)$/doclinkdialog.obj \ - $(SLO)$/connpoolconfig.obj \ - $(SLO)$/internationaloptions.obj \ - $(SLO)$/connpooloptions.obj \ - $(SLO)$/optgdlg.obj \ - $(SLO)$/optmemory.obj \ - $(SLO)$/opthtml.obj \ - $(SLO)$/optfltr.obj \ - $(SLO)$/treeopt.obj \ - $(SLO)$/autocdlg.obj \ - $(SLO)$/dialmgr.obj \ - $(SLO)$/textanim.obj \ - $(SLO)$/labdlg.obj \ - $(SLO)$/dstribut.obj \ - $(SLO)$/hangulhanjadlg.obj \ - $(SLO)$/showcols.obj \ - $(SLO)$/zoom.obj \ - $(SLO)$/cuigaldlg.obj \ - $(SLO)$/cuiimapwnd.obj \ - $(SLO)$/hlmarkwn.obj \ - $(SLO)$/cuicharmap.obj \ - $(SLO)$/srchxtra.obj \ - $(SLO)$/bbdlg.obj \ - $(SLO)$/swpossizetabpage.obj \ - $(SLO)$/transfrm.obj \ - $(SLO)$/cuisrchdlg.obj \ - $(SLO)$/cuitbxform.obj \ - $(SLO)$/optdict.obj \ - $(SLO)$/dlgname.obj \ - $(SLO)$/multipat.obj \ - $(SLO)$/multifil.obj \ - $(SLO)$/iconcdlg.obj \ - $(SLO)$/hltpbase.obj \ - $(SLO)$/hldocntp.obj \ - $(SLO)$/hldoctp.obj \ - $(SLO)$/hlinettp.obj \ - $(SLO)$/hlmailtp.obj \ - $(SLO)$/cuihyperdlg.obj \ - $(SLO)$/cuifmsearch.obj \ - $(SLO)$/cuigrfflt.obj \ - $(SLO)$/readonlyimage.obj \ - $(SLO)$/optaccessibility.obj \ - $(SLO)$/optsave.obj \ - $(SLO)$/optasian.obj \ - $(SLO)$/optpath.obj \ - $(SLO)$/optcolor.obj \ - $(SLO)$/optjsearch.obj \ - $(SLO)$/optinet2.obj \ - $(SLO)$/securityoptions.obj \ - $(SLO)$/webconninfo.obj \ - $(SLO)$/optctl.obj \ - $(SLO)$/optjava.obj \ - $(SLO)$/optupdt.obj \ - $(SLO)$/optimprove.obj \ - $(SLO)$/optimprove2.obj \ - $(SLO)$/optgenrl.obj \ - $(SLO)$/connect.obj \ - $(SLO)$/tabarea.obj \ - $(SLO)$/tabline.obj \ - $(SLO)$/measure.obj \ - $(SLO)$/tpshadow.obj \ - $(SLO)$/tpline.obj \ - $(SLO)$/tpgradnt.obj \ - $(SLO)$/tpcolor.obj \ - $(SLO)$/tpbitmap.obj \ - $(SLO)$/tphatch.obj \ - $(SLO)$/tplneend.obj \ - $(SLO)$/tplnedef.obj \ - $(SLO)$/SpellAttrib.obj \ - $(SLO)$/SpellDialog.obj \ - $(SLO)$/numpages.obj \ - $(SLO)$/paragrph.obj \ - $(SLO)$/tabstpge.obj \ - $(SLO)$/textattr.obj \ - $(SLO)$/align.obj \ - $(SLO)$/backgrnd.obj \ - $(SLO)$/border.obj \ - $(SLO)$/chardlg.obj \ - $(SLO)$/numfmt.obj \ - $(SLO)$/page.obj \ - $(SLO)$/postdlg.obj \ - $(SLO)$/sdrcelldlg.obj \ - $(SLO)$/splitcelldlg.obj \ - $(SLO)$/newtabledlg.obj \ - $(SLO)$/grfpage.obj \ - $(SLO)$/cfgchart.obj \ - $(SLO)$/optchart.obj - -.IF "$(GUI)"=="WNT" -SLOFILES+=$(SLO)$/winpluginlib.obj -LIB2OBJFILES+=$(SLO)$/winpluginlib.obj -.ENDIF - - # --- Targets ------------------------------------------------------- .INCLUDE : target.mk diff --git a/svx/source/dialog/sendreportw32.cxx b/svx/source/dialog/sendreportw32.cxx index 594d7cdd177e..3bf53a53ff09 100644 --- a/svx/source/dialog/sendreportw32.cxx +++ b/svx/source/dialog/sendreportw32.cxx @@ -31,6 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" + #define UNICODE #define _UNICODE diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index 21e8e18b7869..8d0ec6ac4d59 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -52,6 +52,7 @@ #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/frame/XModuleManager.hpp> #include <comphelper/processfactory.hxx> +#include <svtools/itempool.hxx> #include <sfx2/app.hxx> #include <toolkit/unohlp.hxx> @@ -69,12 +70,9 @@ #include <sfx2/srchitem.hxx> #include <svx/pageitem.hxx> #include "srchctrl.hxx" -//CHINA001 #include "srchxtra.hxx" #include <svx/dialmgr.hxx> #include "dlgutil.hxx" -#include <optjsearch.hxx> #include <svx/brshitem.hxx> -#include "backgrnd.hxx" #include <svx/svxdlg.hxx> //CHINA001 diff --git a/svx/source/dialog/svxbmpnumvalueset.cxx b/svx/source/dialog/svxbmpnumvalueset.cxx index 39a0703ea1b2..9ab1eb43de5c 100644 --- a/svx/source/dialog/svxbmpnumvalueset.cxx +++ b/svx/source/dialog/svxbmpnumvalueset.cxx @@ -51,7 +51,6 @@ #include <sfx2/objsh.hxx> #include <vcl/graph.hxx> #include <vcl/msgbox.hxx> -#include <svx/charmap.hxx> #include <flstitem.hxx> #include <dlgutil.hxx> #ifndef _XTABLE_HXX //autogen diff --git a/svx/source/dialog/test.src b/svx/source/dialog/test.src deleted file mode 100644 index bc40a1c44b6d..000000000000 --- a/svx/source/dialog/test.src +++ /dev/null @@ -1,583 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: test.src,v $ - * $Revision: 1.32 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - // include ------------------------------------------------------------------ -#include "helpid.hrc" -#include <svx/dialogs.hrc> -#include "transfrm.hrc" - // - // RID_SVXPAGE_POSITION ----------------------------------------------------- -TabPage RID_SVXPAGE_POSITION -{ - HelpId = HID_TRANS_POSITION ; - Hide = TRUE ; - Text [ en-US ] = "Position" ; - Size = MAP_APPFONT ( 189 , 97 ) ; - FixedText FT_POS_X - { - Pos = MAP_APPFONT ( 12 , 14 ) ; - Size = MAP_APPFONT ( 37 , 10 ) ; - Text [ en-US ] = "Position ~X"; - }; - FixedText FT_POS_Y - { - Pos = MAP_APPFONT ( 12 , 29 ) ; - Size = MAP_APPFONT ( 37 , 10 ) ; - Text [ en-US ] = "Position ~Y"; - }; - MetricField MTR_FLD_POS_X - { - Border = TRUE ; - Pos = MAP_APPFONT ( 51 , 12 ) ; - Size = MAP_APPFONT ( 54 , 12 ) ; - TabStop = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - Minimum = -120000 ; - Maximum = 240000 ; - StrictFormat = TRUE ; - DecimalDigits = 2 ; - Unit = FUNIT_MM ; - SpinSize = 10 ; - }; - MetricField MTR_FLD_POS_Y - { - Border = TRUE ; - Pos = MAP_APPFONT ( 51 , 27 ) ; - Size = MAP_APPFONT ( 54 , 12 ) ; - TabStop = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - Minimum = -120000 ; - Maximum = 240000 ; - StrictFormat = TRUE ; - DecimalDigits = 2 ; - Unit = FUNIT_MM ; - SpinSize = 10 ; - }; - GroupBox GRP_POSITION - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 105 , 42 ) ; - Text [ en-US ] = "Position" ; - }; - Control CTL_RECT - { - HelpId = HID_TPPOSITION_CTRL ; - Border = TRUE ; - Pos = MAP_APPFONT ( 120 , 6 ) ; - Size = MAP_APPFONT ( 60 , 39 ) ; - TabStop = TRUE ; - QuickHelpText [ en-US ] = "Base point" ; - }; - GroupBox GB_ANCHOR - { - Pos = MAP_APPFONT ( 6 , 50 ) ; - Size = MAP_APPFONT ( 105 , 41 ) ; - Hide = TRUE ; - Text [ en-US ] = "Anchoring" ; - }; - FixedText FT_ANCHOR - { - Pos = MAP_APPFONT ( 12 , 59 ) ; - Size = MAP_APPFONT ( 37 , 10 ) ; - Hide = TRUE ; - Text [ en-US ] = "~Anchor" ; - }; - ListBox LB_ANCHOR - { - Pos = MAP_APPFONT ( 51 , 59 ) ; - Size = MAP_APPFONT ( 54 , 60 ) ; - Hide = TRUE ; - DropDown = TRUE ; - StringList [ en-US ] = - { - < "To Paragraph" ; > ; - < "As character" ; > ; - < "To Page" ; > ; - < "To Frame" ; > ; - }; - }; - FixedText FT_ORIENT - { - Pos = MAP_APPFONT ( 12 , 74 ) ; - Size = MAP_APPFONT ( 37 , 10 ) ; - Text = "~Position" ; - Hide = TRUE ; - }; - ListBox LB_ORIENT - { - Pos = MAP_APPFONT ( 51 , 74 ) ; - Size = MAP_APPFONT ( 54 , 60 ) ; - Hide = TRUE ; - DropDown = TRUE ; - StringList [ en-US ] = - { - < "From Top" ; > ; - < "Above" ; > ; - < "Centered" ; > ; - < "Below" ; > ; - < "Top of character" ; > ; - < "Center of character" ; > ; - < "Bottom of character" ; > ; - < "Top of line" ; > ; - < "Center of line" ; > ; - < "Bottom of line" ; > ; - }; - }; - TriStateBox TSB_PROTECT - { - Pos = MAP_APPFONT ( 120 , 54 ) ; - Size = MAP_APPFONT ( 60 , 10 ) ; - /* ### ACHTUNG: Neuer Text in Resource? Sch~tzen : Sch~tzen */ - /* ### ACHTUNG: Neuer Text in Resource? Sch~tzen : Sch~tzen */ - Text [ en-US ] = "Pr~otect" ; - TabStop = TRUE ; - }; -}; - // RID_SVXPAGE_SIZE --------------------------------------------------------- -TabPage RID_SVXPAGE_SIZE -{ - HelpId = HID_TRANS_SIZE ; - Hide = TRUE ; - /* ### ACHTUNG: Neuer Text in Resource? Gre : Gre */ - /* ### ACHTUNG: Neuer Text in Resource? Gre : Gre */ - Text [ en-US ] = "Size" ; - Size = MAP_APPFONT ( 189 , 97 ) ; - FixedText FT_WIDTH - { - Pos = MAP_APPFONT ( 12 , 14 ) ; - Size = MAP_APPFONT ( 23 , 10 ) ; - Text [ en-US ] = "Wi~dth" ; - }; - FixedText FT_HEIGHT - { - Pos = MAP_APPFONT ( 12 , 29 ) ; - Size = MAP_APPFONT ( 23 , 10 ) ; - /* ### ACHTUNG: Neuer Text in Resource? H~he : H~he */ - /* ### ACHTUNG: Neuer Text in Resource? H~he : H~he */ - Text [ en-US ] = "H~eight" ; - }; - MetricField MTR_FLD_WIDTH - { - Border = TRUE ; - Pos = MAP_APPFONT ( 51 , 12 ) ; - Size = MAP_APPFONT ( 54 , 12 ) ; - TabStop = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - Minimum = 1 ; - Maximum = 120000 ; - StrictFormat = TRUE ; - DecimalDigits = 2 ; - Unit = FUNIT_MM ; - SpinSize = 10 ; - }; - MetricField MTR_FLD_HEIGHT - { - Border = TRUE ; - Pos = MAP_APPFONT ( 51 , 27 ) ; - Size = MAP_APPFONT ( 54 , 12 ) ; - TabStop = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - Minimum = 1 ; - Maximum = 120000 ; - StrictFormat = TRUE ; - DecimalDigits = 2 ; - Unit = FUNIT_MM ; - SpinSize = 10 ; - }; - Control CTL_RECT - { - HelpId = HID_TPSIZE_CTRL ; - Border = TRUE ; - Pos = MAP_APPFONT ( 120 , 6 ) ; - Size = MAP_APPFONT ( 60 , 39 ) ; - TabStop = TRUE ; - QuickHelpText [ en-US ] = "Base point" ; - }; - CheckBox CBX_SCALE - { - Pos = MAP_APPFONT ( 6 , 54 ) ; - Size = MAP_APPFONT ( 60 , 10 ) ; - TabStop = TRUE ; - Text [ en-US ] = "~Keep ratio" ; - }; - GroupBox GRP_SIZE - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 105 , 42 ) ; - /* ### ACHTUNG: Neuer Text in Resource? Gre : Gre */ - /* ### ACHTUNG: Neuer Text in Resource? Gre : Gre */ - Text [ en-US ] = "Size" ; - }; - TriStateBox TSB_PROTECT - { - Pos = MAP_APPFONT ( 120 , 54 ) ; - Size = MAP_APPFONT ( 60 , 10 ) ; - /* ### ACHTUNG: Neuer Text in Resource? Sch~tzen : Sch~tzen */ - /* ### ACHTUNG: Neuer Text in Resource? Sch~tzen : Sch~tzen */ - Text [ en-US ] = "Pr~otect" ; - TabStop = TRUE ; - }; - TriStateBox TSB_AUTOGROW_WIDTH - { - Pos = MAP_APPFONT ( 6 , 66 ) ; - Size = MAP_APPFONT ( 95 , 12 ) ; - Text [ en-US ] = "~Fit width to text" ; - TabStop = TRUE ; - }; - TriStateBox TSB_AUTOGROW_HEIGHT - { - Pos = MAP_APPFONT ( 6 , 78 ) ; - Size = MAP_APPFONT ( 95 , 12 ) ; - /* ### ACHTUNG: Neuer Text in Resource? Hh~e an Text anpassen : Hh~e an Text anpassen */ - /* ### ACHTUNG: Neuer Text in Resource? Hh~e an Text anpassen : Hh~e an Text anpassen */ - Text [ en-US ] = "Fit ~height to text" ; - TabStop = TRUE ; - }; -}; - // RID_SVXPAGE_ANGLE -------------------------------------------------------- -TabPage RID_SVXPAGE_ANGLE -{ - HelpId = HID_TRANS_ANGLE ; - Hide = TRUE ; - Text [ en-US ] = "Angle" ; - Size = MAP_APPFONT ( 189 , 97 ) ; - FixedText FT_POS_X - { - Pos = MAP_APPFONT ( 12 , 14 ) ; - Size = MAP_APPFONT ( 37 , 10 ) ; - Text [ en-US ] = "Position ~X" ; - }; - FixedText FT_POS_Y - { - Pos = MAP_APPFONT ( 12 , 29 ) ; - Size = MAP_APPFONT ( 37 , 10 ) ; - Text [ en-US ] = "Position ~Y" ; - }; - MetricField MTR_FLD_POS_X - { - Border = TRUE ; - Pos = MAP_APPFONT ( 51 , 12 ) ; - Size = MAP_APPFONT ( 54 , 12 ) ; - TabStop = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - Minimum = -500000 ; - Maximum = 500000 ; - StrictFormat = TRUE ; - DecimalDigits = 2 ; - Unit = FUNIT_MM ; - SpinSize = 10 ; - }; - MetricField MTR_FLD_POS_Y - { - Border = TRUE ; - Pos = MAP_APPFONT ( 51 , 27 ) ; - Size = MAP_APPFONT ( 54 , 12 ) ; - TabStop = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - Minimum = -500000 ; - Maximum = 500000 ; - StrictFormat = TRUE ; - DecimalDigits = 2 ; - Unit = FUNIT_MM ; - SpinSize = 10 ; - }; - FixedText FT_ANGLE - { - Pos = MAP_APPFONT ( 12 , 70 ) ; - Size = MAP_APPFONT ( 26 , 10 ) ; - Text [ en-US ] = "~Angle" ; - }; - MetricField MTR_FLD_ANGLE - { - Border = TRUE ; - Pos = MAP_APPFONT ( 51 , 68 ) ; - Size = MAP_APPFONT ( 54 , 12 ) ; - TabStop = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - Minimum = -500000 ; - Maximum = 500000 ; - StrictFormat = TRUE ; - DecimalDigits = 2 ; - Unit = FUNIT_CUSTOM ; - CustomUnitText [ en-US ] = " degrees" ; - SpinSize = 500 ; - }; - Control CTL_RECT - { - HelpId = HID_TPROTATION_CTRL1 ; - Border = TRUE ; - Pos = MAP_APPFONT ( 120 , 6 ) ; - Size = MAP_APPFONT ( 60 , 39 ) ; - TabStop = TRUE ; - QuickHelpText [ en-US ] = "Rotation point" ; - }; - Control CTL_ANGLE - { - HelpId = HID_TPROTATION_CTRL2 ; - Border = TRUE ; - Pos = MAP_APPFONT ( 120 , 54 ) ; - Size = MAP_APPFONT ( 60 , 37 ) ; - TabStop = TRUE ; - }; - GroupBox GRP_POSITION - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 105 , 42 ) ; - Text [ en-US ] = "Pivot point" ; - }; - GroupBox GRP_ANGLE - { - Pos = MAP_APPFONT ( 6 , 50 ) ; - Size = MAP_APPFONT ( 105 , 41 ) ; - Text [ en-US ] = "Rotation angle" ; - }; -}; - // RID_SVXPAGE_SLANT ----------------------------------------------------- -TabPage RID_SVXPAGE_SLANT -{ - HelpId = HID_TRANS_SLANT ; - Hide = TRUE ; - Size = MAP_APPFONT ( 189 , 97 ) ; - /* ### ACHTUNG: Neuer Text in Resource? Schrgstellen / Eckenradius : Schrgstellen / Eckenradius */ - /* ### ACHTUNG: Neuer Text in Resource? Schrgstellen / Eckenradius : Schrgstellen / Eckenradius */ - Text [ en-US ] = "Slant / Corner Radius" ; - FixedText FT_RADIUS - { - Pos = MAP_APPFONT ( 12 , 23 ) ; - Size = MAP_APPFONT ( 33 , 10 ) ; - Text [ en-US ] = "~Radius" ; - }; - MetricField MTR_FLD_RADIUS - { - Border = TRUE ; - Pos = MAP_APPFONT ( 51 , 21 ) ; - Size = MAP_APPFONT ( 54 , 12 ) ; - TabStop = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - Minimum = 0 ; - Maximum = 500000 ; - StrictFormat = TRUE ; - DecimalDigits = 2 ; - Unit = FUNIT_MM ; - SpinSize = 10 ; - }; - FixedText FT_ANGLE - { - Pos = MAP_APPFONT ( 12 , 70 ) ; - Size = MAP_APPFONT ( 30 , 10 ) ; - Text [ en-US ] = "~Angle" ; - }; - MetricField MTR_FLD_ANGLE - { - Border = TRUE ; - Pos = MAP_APPFONT ( 51 , 68 ) ; - Size = MAP_APPFONT ( 54 , 12 ) ; - TabStop = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - Minimum = -8900 ; - First = -8900 ; - Maximum = 8900 ; - Last = 8900 ; - StrictFormat = TRUE ; - DecimalDigits = 2 ; - Unit = FUNIT_CUSTOM ; - SpinSize = 500 ; - CustomUnitText [ en-US ] = " degrees" ; - }; - /* - Control CTL_ANGLE - { - Border = TRUE; - Pos = MAP_APPFONT( 120, 54 ); - Size = MAP_APPFONT( 60, 37 ); - TabStop = TRUE; - }; -*/ - GroupBox GRP_RADIUS - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 105 , 42 ) ; - Text [ en-US ] = "Corner radius" ; - }; - GroupBox GRP_SLANT - { - Pos = MAP_APPFONT ( 6 , 50 ) ; - Size = MAP_APPFONT ( 105 , 41 ) ; - /* ### ACHTUNG: Neuer Text in Resource? Schrgstellen : Schrgstellen */ - /* ### ACHTUNG: Neuer Text in Resource? Schrgstellen : Schrgstellen */ - Text [ en-US ] = "Slant" ; - }; - /* - TriStateBox TSB_VERTICAL - { - Pos = MAP_APPFONT( 12, 62 ); - Size = MAP_APPFONT( 40, 12 ); - Text = "~Vertikal"; - TabStop = TRUE; - }; -*/ -}; - // RID_SVXDLG_TRANSFORM ----------------------------------------------------- -TabDialog RID_SVXDLG_TRANSFORM -{ - Size = MAP_APPFONT ( 237 , 161 ) ; - OutputSize = TRUE ; - SvLook = TRUE ; - Size = MAP_APPFONT ( 237 , 161 ) ; - /* ### ACHTUNG: Neuer Text in Resource? Position und Gre : Position und Gre */ - /* ### ACHTUNG: Neuer Text in Resource? Position und Gre : Position und Gre */ - Text [ en-US ] = "Position and Size" ; - Moveable = TRUE ; - TabControl TAB_CONTROL - { - OutputSize = TRUE ; - Pos = MAP_APPFONT ( 3 , 3 ) ; - Size = MAP_APPFONT ( 189 , 97 ) ; - PageList = - { - PageItem - { - Identifier = RID_SVXPAGE_POSITION ; - Text [ en-US ] = "Position" ; - PageResID = RID_SVXPAGE_POSITION ; - }; - PageItem - { - Identifier = RID_SVXPAGE_SIZE ; - /* ### ACHTUNG: Neuer Text in Resource? Gre : Gre */ - /* ### ACHTUNG: Neuer Text in Resource? Gre : Gre */ - Text [ en-US ] = "Size" ; - PageResID = RID_SVXPAGE_SIZE ; - }; - PageItem - { - Identifier = RID_SVXPAGE_ANGLE ; - Text [ en-US ] = "Rotation" ; - PageResID = RID_SVXPAGE_ANGLE ; - }; - PageItem - { - Identifier = RID_SVXPAGE_SLANT ; - /* ### ACHTUNG: Neuer Text in Resource? Schrgstellen / Eckenradius : Schrgstellen / Eckenradius */ - /* ### ACHTUNG: Neuer Text in Resource? Schrgstellen / Eckenradius : Schrgstellen / Eckenradius */ - PageResID = RID_SVXPAGE_SLANT ; - Text [ en-US ] = "Slant / Corner Radius" ; - }; - }; - }; -}; - // ********************************************************************** EOF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/svx/source/dialog/charmap.src b/svx/source/dialog/ucsubset.src index 4dd67233e954..fb8419606cb9 100644..100755 --- a/svx/source/dialog/charmap.src +++ b/svx/source/dialog/ucsubset.src @@ -29,122 +29,7 @@ ************************************************************************/ // include --------------------------------------------------------------- -#include <svx/svxids.hrc> -#include <svx/dialogs.hrc> -#include "charmap.hrc" #include <svx/ucsubset.hrc> -#include "helpid.hrc" - - // RID_SVXDLG_CHARMAP ---------------------------------------------------- -ModalDialog RID_SVXDLG_CHARMAP -{ - HelpId = SID_CHARMAP ; - SvLook = TRUE ; - Text [ en-US ] = "Special Characters"; - Size = MAP_APPFONT ( 297 , 153 ) ; - OutputSize = TRUE ; - Moveable = TRUE ; - Control CT_SHOWSET - { - HelpId = HID_CHARMAP_CTL_SHOWSET ; - Border = TRUE ; - Pos = MAP_APPFONT ( 6 , 24 ) ; - Size = MAP_APPFONT ( 230 , 112 ) ; - TabStop = TRUE ; - Group = TRUE ; - }; - FixedText FT_FONT - { - Pos = MAP_APPFONT ( 6 , 8 ) ; - Size = MAP_APPFONT ( 33 , 8 ) ; - Text [ en-US ] = "~Font" ; - Left = TRUE ; - Group = TRUE ; - }; - ListBox LB_FONT - { - Pos = MAP_APPFONT ( 42 , 6 ) ; - Size = MAP_APPFONT ( 70 , 58 ) ; - Sort = TRUE ; - TabStop = TRUE ; - DropDown = TRUE ; - }; - FixedText FT_SUBSET - { - Pos = MAP_APPFONT ( 118 , 8 ) ; - Size = MAP_APPFONT ( 42 , 8 ) ; - Text [ en-US ] = "~Subset"; - }; - ListBox LB_SUBSET - { - Pos = MAP_APPFONT ( 161 , 6 ) ; - Size = MAP_APPFONT ( 63 , 68 ) ; - Sort = FALSE ; - TabStop = TRUE ; - DropDown = TRUE ; - }; - FixedText FT_SYMBOLE - { - Pos = MAP_APPFONT ( 6 , 140 ) ; - Size = MAP_APPFONT ( 38 , 8 ) ; - Left = TRUE ; - Text [ en-US ] = "Characters:"; - }; -/* - Edit CT_SHOWTEXT - { - Border = TRUE ; - Pos = MAP_APPFONT ( 53 , 120 ) ; - Size = MAP_APPFONT ( 230 , 18 ) ; - TabStop = TRUE ; - }; -*/ - Control CT_SHOWTEXT - { - HelpId = HID_CHARMAP_CTL_SHOWTEXT ; - Pos = MAP_APPFONT ( 46 , 137 ) ; - Size = MAP_APPFONT ( 244 , 16 ) ; - Group = TRUE ; - }; - Control CT_SHOWCHAR - { - HelpId = HID_CHARMAP_CTL_SHOWCHAR ; - Pos = MAP_APPFONT ( 241 , 79 ) ; - Size = MAP_APPFONT ( 50 , 44 ) ; - Group = TRUE ; - }; - FixedText FT_CHARCODE - { - Pos = MAP_APPFONT ( 241 , 126 ) ; - Size = MAP_APPFONT ( 50 , 8 ) ; - Center = TRUE ; - }; - OKButton BTN_CHAR_OK - { - Pos = MAP_APPFONT ( 242 , 6 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - DefButton = TRUE ; - }; - CancelButton BTN_CHAR_CANCEL - { - Pos = MAP_APPFONT ( 242 , 23 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - HelpButton BTN_CHAR_HELP - { - Pos = MAP_APPFONT ( 242 , 43 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - PushButton BTN_DELETE - { - Pos = MAP_APPFONT ( 242 , 63 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - Text [ en-US ] = "~Delete"; - }; -}; /* * strings for unicode range descriptions (used e.g. by charmap) diff --git a/svx/source/init/makefile.mk b/svx/source/init/makefile.mk deleted file mode 100644 index 1d406626f1e7..000000000000 --- a/svx/source/init/makefile.mk +++ /dev/null @@ -1,49 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2008 by Sun Microsystems, Inc. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.4 $ -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=svx -TARGET=init - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES= \ - $(SLO)$/init.obj - -.INCLUDE : target.mk diff --git a/svx/util/cui.map b/svx/util/cui.map index 51f26bb81cfb..b43a11bd5096 100644 --- a/svx/util/cui.map +++ b/svx/util/cui.map @@ -1,6 +1,7 @@ CUI_1_0 { global: CreateDialogFactory; + GetSpecialCharsForEdit; local: *; }; diff --git a/svx/util/hidother.src b/svx/util/hidother.src index 1dff4a184b7e..9da8c59bcd63 100644 --- a/svx/util/hidother.src +++ b/svx/util/hidother.src @@ -31,7 +31,7 @@ #include "hidother.hrc" #include <svx/svxids.hrc> #include "../inc/fmhelp.hrc" -#include "../source/dialog/svuidlg.hrc" +#include "../source/cui/svuidlg.hrc" hidspecial SID_GALLERY_IMPORTTHEME { HelpID = SID_GALLERY_IMPORTTHEME; }; hidspecial HID_GALLERY_NEW_THEME { HelpID = HID_GALLERY_NEW_THEME; }; @@ -502,6 +502,8 @@ hidspecial HID_SVX_COMMON_MACRO_ORGANIZER { HelpId = HID_SVX_COMMON_MACRO_ORGANI hidspecial HID_HANGULDLG_SUGGESTIONS { HelpId = HID_HANGULDLG_SUGGESTIONS; }; hidspecial HID_HANGULDLG_SUGGESTIONS_GRID { HelpId = HID_HANGULDLG_SUGGESTIONS_GRID; }; hidspecial HID_HANGULDLG_SUGGESTIONS_LIST { HelpId = HID_HANGULDLG_SUGGESTIONS_LIST; }; +hidspecial HID_MACROCHECKDIALOG { HelpID = HID_MACROCHECKDIALOG; }; +hidspecial HID_MACRO_HEADERTABLISTBOX { HelpID = HID_MACRO_HEADERTABLISTBOX; }; hidspecial HID_PASTE_DLG { HelpId = HID_PASTE_DLG; }; hidspecial HID_LINKDLG_TABLB { HelpId = HID_LINKDLG_TABLB; }; diff --git a/svx/util/makefile.mk b/svx/util/makefile.mk index 6c12d6456837..f3e180140cdd 100644 --- a/svx/util/makefile.mk +++ b/svx/util/makefile.mk @@ -66,7 +66,6 @@ LIB1FILES+=$(SLB)$/ibrwimp.lib LIB2TARGET= $(SLB)$/$(TARGET)_2.lib LIB2FILES=\ - $(SLB)$/init.lib \ $(SLB)$/items.lib \ $(SLB)$/svxlink.lib \ $(SLB)$/svxrtf.lib \ @@ -143,7 +142,6 @@ SHL1DEF= $(MISC)$/$(SHL1TARGET).def DEF1NAME= $(SHL1TARGET) DEFLIB1NAME=$(TARGET) $(TARGET)_2 $(TARGET)_3 $(TARGET)_4 - # cui SHL2TARGET= cui$(DLLPOSTFIX) SHL2VERSIONMAP= cui.map @@ -154,9 +152,6 @@ SHL2DEF= $(MISC)$/$(SHL2TARGET).def DEF2NAME= $(SHL2TARGET) SHL2LIBS= $(SLB)$/cui.lib -SHL2OBJS= \ - $(SLO)$/cuiexp.obj \ - $(SLO)$/dlgfact.obj SHL2STDLIBS= \ $(SVXLIB) \ @@ -164,6 +159,7 @@ SHL2STDLIBS= \ $(SFX2LIB) \ $(GOODIESLIB) \ $(BASEGFXLIB) \ + $(BASICLIB) \ $(LNGLIB) \ $(SVTOOLLIB) \ $(TKLIB) \ @@ -173,8 +169,8 @@ SHL2STDLIBS= \ $(TOOLSLIB) \ $(I18NISOLANGLIB) \ $(COMPHELPERLIB) \ - $(UCBHELPERLIB) \ - $(CPPUHELPERLIB) \ + $(UCBHELPERLIB) \ + $(CPPUHELPERLIB) \ $(CPPULIB) \ $(VOSLIB) \ $(SALLIB) \ @@ -198,7 +194,9 @@ SRSFILELIST=\ $(SRS)$/editeng.srs \ $(SRS)$/outliner.srs \ $(SRS)$/dialogs.srs \ + $(SRS)$/cui.srs \ $(SRS)$/drawdlgs.srs \ + $(SRS)$/cuidrawdlgs.srs \ $(SRS)$/mnuctrls.srs \ $(SRS)$/stbctrls.srs \ $(SRS)$/tbxctrls.srs \ |