Commit Graph

50 Commits

Author SHA1 Message Date
Caolán McNamara
213524cf5a make link RefButton and widget for shrunk dialog title explicit
Change-Id: Ia6dd6cc4cf89b067310639bc3da72abbc6fa1ad2
2013-03-08 13:42:32 +00:00
Noel Grandin
3554b36530 fix for fdo#61801
... "crash on Tools - Options - LibreOffice - Personalization - Select Background Image"

The root cause of this is my conversion of the UNO code to use the
new-style FilePicker service constructor in commit
4b51374a70

Unfortunately, the new-style service constructor will always call
initialize(Sequence<Any>), which the old code did not do.
And initialize does not like being called without any arguments.

The cleanest fix for this is to simply remove the createDefault()
service constructor method and make all the call sites explicitly
choose the style of FilePicker dialog they want.

As a bonus, this simplifies some of the call sites.

Change-Id: I75f5e03cff4e39abe22cd9650a079ec78ab636c4
Reviewed-on: https://gerrit.libreoffice.org/2553
Reviewed-by: Kohei Yoshida <kohei.yoshida@gmail.com>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2013-03-05 16:12:53 +00:00
Noel Grandin
4b51374a70 fdo#46808, Adapt ui::dialogs::FilePicker UNO service to new style
Change-Id: I1cafbfc53994e5d74241042dbd1d292ddbda67d5
2013-02-12 10:14:45 +02:00
Julien Nabet
2fbd64cef8 More cppcheck cleaning in sc
Change-Id: Ie040fa7ed9a3304bd4a10e404b7a0a4e45cbd69c
2012-12-30 21:19:04 +01:00
Kohei Yoshida
cc486a467a Don't forget to clear this when loading a new XML file.
Change-Id: I97a1e01e983660304e78f05d5a025080d30aab46
2012-11-30 00:08:19 -05:00
Kohei Yoshida
24a2e032ed Highlight the reference entry after ensuring that it's mappable.
Change-Id: I9b245c56c58b2db741e7c69c5ad480179db25ee8
2012-11-30 00:04:48 -05:00
Kohei Yoshida
949a4e15de Selecting a child entry of a recurring element should select all sub-tree.
And use the parent element entry to set the mapped cell position.

Change-Id: I1def045000e707903dcc91ab46da3c66195506da
2012-11-29 23:42:21 -05:00
Kohei Yoshida
a013ffa4f7 Introduce a 'highlighted' state which differs from a 'selected' state.
And use that to only highlight child entries which should logically be
treated as not-selected but should have the same appearance as the
selected entries.

A 'selected' state is logically registered as 'selected' as well as
visually.  A 'highlighted' state should only appear as if it's selected
but logically it's treated the same way as non-selected entry.

Change-Id: Ic4bc6923c7678044cf552194ad9865371465c614
2012-11-29 21:29:31 -05:00
Kohei Yoshida
ded6f06ec5 Forgot to remove this.
Change-Id: I4aa4538fd1bf046ff3f7bff278b96f482de1a9b9
2012-11-29 17:24:57 -05:00
Kohei Yoshida
251dab0145 Pass pointer to view data entry to Paint() instead of its raw flag value.
We need to hide these flags away.

Change-Id: I112003a88a92174f5012b3356ba261a039eeccc1
2012-11-29 16:34:43 -05:00
Kohei Yoshida
764878deac Highlight all its child entries when a recurring element is selected.
Change-Id: I5d91d702fa0b55d9a9a63ef66a5ce243943e77a3
2012-11-29 16:34:43 -05:00
Kohei Yoshida
abfe16cec6 Get it to build after the rebase.
Change-Id: I86bc4fb6aa4158f0efc3ab765841abcea9063693
2012-11-28 13:28:32 -05:00
Kohei Yoshida
9d6ed5dd8b Correctly handle xml namespaces when importing xml content.
But it's still not working. I need to dig some more.

Change-Id: I06d4d70e1a4234b031741a496f2651d016c35ecc
2012-11-28 13:28:32 -05:00
Kohei Yoshida
1157cbc993 Separate the XML part of orcus filters into own class.
Along with other reorganization of the orcus interface code...

This XML context object will be used to store data specific to each
loaded XML file, such as XML stream, namespace repository and so on.

Change-Id: I21c43ab0026954c5d52f4985a169934f8fb9f704
2012-11-28 13:28:31 -05:00
Kohei Yoshida
c85b1974be Now I can remove this ugly const_cast.
Change-Id: Ifc4d0028d334bd6fa9dfdea86543b5eaf25313e0
2012-11-28 13:28:30 -05:00
Kohei Yoshida
40eb44c1cd Enable the 'Import' button only when linked data exists.
It makes no sense to allow import if there is no link specified.

Change-Id: I3ff4bfa7fd78c79a2c4ee74c7a1a34d2b7a2d1c4
2012-11-28 13:28:30 -05:00
Kohei Yoshida
582931ec18 Set initial focus to the 'Open XML source' button.
This helps with keyboard-only navigation in this dialog.

Change-Id: Ie3d580ba921c93ae256ad0a503615de7a037323a
2012-11-28 13:28:30 -05:00
Kohei Yoshida
134c7e65df Setting a reference via ref picker should update the link ref data.
Change-Id: Ie1559e1ece8d57b09e68676f88991c67ff8db03e
2012-11-28 13:28:29 -05:00
Kohei Yoshida
7a3bfca586 Broadcast and re-paint when the XML import is complete.
Change-Id: I8bf7a3331a24d39ce327264cd43ccb5910ce1251
2012-11-28 13:28:29 -05:00
Kohei Yoshida
78ac5e8533 Remove debug statements.
Change-Id: I3e3d4863bef27e91b95f9e6cbe5c2daa81ece0b2
2012-11-28 13:28:29 -05:00
Kohei Yoshida
f10c5f33c1 Register range links to orcus_xml too.
But range links fail to import. Looks like sheet names are corrupted.
I need to debug this...

Change-Id: If2aeb3b81db65749f05edfbdd2f3388be4f2539c
2012-11-28 13:28:29 -05:00
Kohei Yoshida
071928f290 Set all single cell links to orcus_xml, and start reading the file.
Alas, data won't get imported because I haven't implemented get_sheet()
interface method.

Change-Id: Id53b2c68b2fdf4c03fa6d6de25dd7762a51bd610
2012-11-28 13:28:28 -05:00
Kohei Yoshida
971f0e32f2 Not a good idea to close the dialog first then start the import.
Because that leads to a crash.

Change-Id: I7ca7d94e1164a44bbef9e9b41e3f8c5bcf113c22
2012-11-28 13:28:28 -05:00
Kohei Yoshida
2ffceb198e Press 'Import' in the dialog to start importing XML.
For now, the dialog only calls importXML() when the Import button
is pressed, and the importXML() function still does nothing.

Change-Id: I3427d343f88ba2a9b076ffc0ee4bcc44055d7717
2012-11-28 13:28:28 -05:00
Kohei Yoshida
450bca12a1 Handler methods for OK and Cancel.
Change-Id: I8637543dc10ade3e75205031581eeaadd1b7ca4d
2012-11-28 13:28:28 -05:00
Kohei Yoshida
19d0fcd04e Added OK button next to the Cancel button.
Change-Id: I05782d9be74b3fddd34b79f3e15b43800b654d87
2012-11-28 13:28:27 -05:00
Kohei Yoshida
1b92138385 Get it to build again after the rebase.
The breakage is mostly due to my tree control rework on master.

Change-Id: I1db09fa18b4d997cf77fea2968e787cbce3b0a72
2012-11-28 13:28:27 -05:00
Kohei Yoshida
35c5281f74 When setting a link position to a repeat element, set the range parent flag.
Change-Id: I86b999297f96c4a2e55682d1da9a6c2e62f5f472
2012-11-28 13:28:26 -05:00
Kohei Yoshida
6fb12c6875 Don't allow reference mode when the control is disabled.
Change-Id: I9ba6121ee67f3f4fc0b4a1fb3b14036fce2e88e9
2012-11-28 13:28:26 -05:00
Kohei Yoshida
8cb7229b31 Handle selection of repeat element.
Change-Id: I73eb83fbbd6deb39ba3e736410b8d5b50f3dffaa
2012-11-28 13:28:26 -05:00
Kohei Yoshida
468dd7eebb I need to check for repeating parent elements too.
Change-Id: I52e87c93e6f3d0108cf517c33f605490dd9a1fc4
2012-11-28 13:28:26 -05:00
Kohei Yoshida
4f0516315c Take care of the default element and attribute selection handlers.
Change-Id: I87aec99679f8beca2be82d6d7df275917ba66d62
2012-11-28 13:28:26 -05:00
Kohei Yoshida
cc635c24f3 Keep track of linked cell positions.
Change-Id: I33e39e53b618270561ba7bfc236e8d8558bccffa
2012-11-28 13:28:25 -05:00
Kohei Yoshida
6f2013f164 More progress on the dialog.
Change-Id: Ib07d6d5de7cd0d72356bbb7859342f5038f05f95
2012-11-28 13:28:25 -05:00
Kohei Yoshida
0b69fbe315 Display selected tree item name on the dialog when clicked on.
Change-Id: If7f7d938f4eacfc921a1e591fa4e59c5c9cf127e
2012-11-28 13:28:25 -05:00
Kohei Yoshida
4de096fad4 Set user data to each tree entry.
Change-Id: I708bbbae7696a66f7acae8a8d01c98a3c81d32e8
2012-11-28 13:28:25 -05:00
Kohei Yoshida
cbc00f54a0 Use param structure to consolidate parameters for loadXMLStructure() call.
Change-Id: I3e5895cd6b2bae4fd18aa13ebf88321f32a95f8d
2012-11-28 13:28:24 -05:00
Kohei Yoshida
d0dd4b64cd Disable update while populating the tree control.
Change-Id: Ic0f5822072a817addc7d296eceadf59467e5ba0f
2012-11-28 13:28:24 -05:00
Kohei Yoshida
f7aae88a1c Use sensible directory path for file picker, handle tree item select.
Change-Id: I2638b1d870ee6b7e6c8697a38df07872184df8c6
2012-11-28 13:28:24 -05:00
Kohei Yoshida
3911c022ef Get the reference edit box to work properly.
Change-Id: Ifd01fe05312c0ece867100019a9f84162e5778c4
2012-11-28 13:28:23 -05:00
Kohei Yoshida
5d034b9130 Turned the xml source dialog into a reference dialog.
Change-Id: Ifb3ebd3c0166343f42dd53bcee83c6b31c84f081
2012-11-28 13:28:23 -05:00
Kohei Yoshida
06114f6a96 Use different icon image for the attribute entries.
Change-Id: Icd053ba7906191f3bc937cdb3c76d037fd67dab5
2012-11-28 13:28:23 -05:00
Kohei Yoshida
19b2f5dfb6 Use different icon for recurring elements.
Change-Id: I3869e4a1f2f4b68d57641395daaf79d911a1a891
2012-11-28 13:28:22 -05:00
Kohei Yoshida
9be2a89ae5 Populate the tree box with real xml structure tree.
Change-Id: Ia91340cee5e25b118ae72a62e0d94cdc976bc14e
2012-11-28 13:28:22 -05:00
Kohei Yoshida
5067591aba Call orcus filter accessor from the dialog when a new source file is set.
For now it doesn't do anything.

Change-Id: I8e41c7e15c3b99ab0ddec8e68242176c97f368fc
2012-11-28 13:28:21 -05:00
Kohei Yoshida
8ca9f3c53e Use file picker dialog to pick the source xml file.
Change-Id: Ie927d8a83fa93e3f61c2c2133fe655854667854c
2012-11-28 13:28:21 -05:00
Kohei Yoshida
650dbb4f16 Some basic dialog layout. It's not functional yet.
Change-Id: Icd46699b8249768fdda1ee140fdacca182a731c0
2012-11-28 13:28:21 -05:00
Kohei Yoshida
54a7c1b258 Use the resource file correctly.
Change-Id: I40af0beaf0de25347e8241c08e3be5f92ac16f93
2012-11-28 13:28:21 -05:00
Kohei Yoshida
2cefc2f4c1 Abstract dialog instantiation code.
Change-Id: I28e7b354928d349d9f6c90092ead2010cfe3c29b
2012-11-28 13:28:20 -05:00
Kohei Yoshida
f1709b198f Add new skeleton files for the new xml source dialog.
Change-Id: I2ac196ea74185fd7f10919ad64434855c5c8b5fa
2012-11-28 13:28:20 -05:00