[Libreoffice-bugs] [Bug 67208] Horizontal rules in old documents are broken: only links in the files
https://bugs.documentfoundation.org/show_bug.cgi?id=67208 --- Comment #8 from Buovjaga --- (In reply to Matt K from comment #7) > How do you insert these lines and is there a purpose for them that is > different than would be achieved by inserting a regular image? You can't insert them anymore as the feature was removed. The idea for this task was to implement some kind of compatibility feature for old documents. However, as this task is 8 years old and there does not appear to be an actual practical demand, I wonder if we should just drop this. -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 67208] Horizontal rules in old documents are broken: only links in the files
https://bugs.documentfoundation.org/show_bug.cgi?id=67208 --- Comment #7 from Matt K --- How do you insert these lines and is there a purpose for them that is different than would be achieved by inserting a regular image? -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 67208] Horizontal rules in old documents are broken: only links in the files
https://bugs.documentfoundation.org/show_bug.cgi?id=67208 Roman Kuznetsov <79045_79...@mail.ru> changed: What|Removed |Added Blocks||103152 Referenced Bugs: https://bugs.documentfoundation.org/show_bug.cgi?id=103152 [Bug 103152] [META] Writer image bugs and enhancements -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 67208] Horizontal rules in old documents are broken: only links in the files
https://bugs.documentfoundation.org/show_bug.cgi?id=67208 jan iversenchanged: What|Removed |Added Whiteboard|ToBeReviewed| -- You are receiving this mail because: You are the assignee for the bug. ___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 67208] Horizontal rules in old documents are broken: only links in the files
https://bugs.documentfoundation.org/show_bug.cgi?id=67208 jan iversenchanged: What|Removed |Added Whiteboard||ToBeReviewed -- You are receiving this mail because: You are the assignee for the bug. ___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Bug 67208] Horizontal rules in old documents are broken: only links in the files
https://bugs.documentfoundation.org/show_bug.cgi?id=67208 jan iversenchanged: What|Removed |Added Whiteboard||ToBeReviewed -- You are receiving this mail because: You are on the CC list for the bug. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Bug 67208] Horizontal rules in old documents are broken: only links in the files
https://bugs.documentfoundation.org/show_bug.cgi?id=67208 jan iversenchanged: What|Removed |Added Keywords||skillCpp -- You are receiving this mail because: You are on the CC list for the bug. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-bugs] [Bug 67208] Horizontal rules in old documents are broken: only links in the files
https://bugs.documentfoundation.org/show_bug.cgi?id=67208 jan iversenchanged: What|Removed |Added Keywords||skillCpp -- You are receiving this mail because: You are the assignee for the bug. ___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 67208] Horizontal rules in old documents are broken: only links in the files
https://bugs.documentfoundation.org/show_bug.cgi?id=67208 --- Comment #4 from superpwnzormega...@gmail.com --- Hello opensource noob, but (kindoff) experienced c++'er here. I did the detection part with: diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx index 58ed9b3..0b5e4e8 100644 --- a/xmloff/source/text/XMLTextFrameContext.cxx +++ b/xmloff/source/text/XMLTextFrameContext.cxx @@ -721,6 +721,30 @@ void XMLTextFrameContext_Impl::Create( bool /*bHRefOrBase64*/ ) GetImport().GetTextImport(); if( !sHRef.isEmpty() ) { +/** + * BUG: 67208 + * + * in old documents horizontal rulers are shown as links to + * nonexisting images. + * + * In here we replace them with ... + */ +const OUString matchString = OUString(/gallery/rulers/); +const sal_Int32 matchLength = matchString.getLength(); +for(sal_Int32 i = sHRef.getLength() - matchLength; i 0; i--){ +if(sHRef.match(matchString, i)){ +SAL_DEBUG(replace something with something here?); +} +/* + * check to see if we are going deeper than one dir from the end + * of the path, if so stop, because our matching matchStringing is only + * relevant for the last part of the path + */ +if(sHRef[i+matchLength-1] == '/'){ +i = -1; +} +} bool bForceLoad = xTxtImport-IsInsertMode() || xTxtImport-IsBlockMode() || xTxtImport-IsStylesOnlyMode() || But I'm not sure with what I should replace these links. Also not that this fix will probably break any images that are put into any /gallery/rulers/ folder, so this path should probably be as long as possible. I tried to reduce the chance of these name clashes by starting the search at the end of the path and going forward up the name untill the first / occurs, assuming that all these ruler styles are directly in the rulers directory, and don't have sub directories (am I right in this?). -- You are receiving this mail because: You are the assignee for the bug. ___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Bug 67208] Horizontal rules in old documents are broken: only links in the files
https://bugs.documentfoundation.org/show_bug.cgi?id=67208 --- Comment #4 from superpwnzormega...@gmail.com --- Hello opensource noob, but (kindoff) experienced c++'er here. I did the detection part with: diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx index 58ed9b3..0b5e4e8 100644 --- a/xmloff/source/text/XMLTextFrameContext.cxx +++ b/xmloff/source/text/XMLTextFrameContext.cxx @@ -721,6 +721,30 @@ void XMLTextFrameContext_Impl::Create( bool /*bHRefOrBase64*/ ) GetImport().GetTextImport(); if( !sHRef.isEmpty() ) { +/** + * BUG: 67208 + * + * in old documents horizontal rulers are shown as links to + * nonexisting images. + * + * In here we replace them with ... + */ +const OUString matchString = OUString(/gallery/rulers/); +const sal_Int32 matchLength = matchString.getLength(); +for(sal_Int32 i = sHRef.getLength() - matchLength; i 0; i--){ +if(sHRef.match(matchString, i)){ +SAL_DEBUG(replace something with something here?); +} +/* + * check to see if we are going deeper than one dir from the end + * of the path, if so stop, because our matching matchStringing is only + * relevant for the last part of the path + */ +if(sHRef[i+matchLength-1] == '/'){ +i = -1; +} +} bool bForceLoad = xTxtImport-IsInsertMode() || xTxtImport-IsBlockMode() || xTxtImport-IsStylesOnlyMode() || But I'm not sure with what I should replace these links. Also not that this fix will probably break any images that are put into any /gallery/rulers/ folder, so this path should probably be as long as possible. I tried to reduce the chance of these name clashes by starting the search at the end of the path and going forward up the name untill the first / occurs, assuming that all these ruler styles are directly in the rulers directory, and don't have sub directories (am I right in this?). -- You are receiving this mail because: You are on the CC list for the bug. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[Bug 67208] Horizontal rules in old documents are broken: only links in the files
https://bugs.freedesktop.org/show_bug.cgi?id=67208 --- Comment #3 from Björn Michaelsen bjoern.michael...@canonical.com --- adding LibreOffice developer list as CC to unresolved Writer EasyHacks for better visibility. see e.g. http://nabble.documentfoundation.org/minutes-of-ESC-call-td4076214.html for details -- You are receiving this mail because: You are on the CC list for the bug. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-bugs] [Bug 67208] Horizontal rules in old documents are broken: only links in the files
https://bugs.freedesktop.org/show_bug.cgi?id=67208 --- Comment #3 from Björn Michaelsen bjoern.michael...@canonical.com --- adding LibreOffice developer list as CC to unresolved Writer EasyHacks for better visibility. see e.g. http://nabble.documentfoundation.org/minutes-of-ESC-call-td4076214.html for details -- You are receiving this mail because: You are the assignee for the bug. ___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Bug 67208] Horizontal rules in old documents are broken: only links in the files
https://bugs.freedesktop.org/show_bug.cgi?id=67208 Björn Michaelsen bjoern.michael...@canonical.com changed: What|Removed |Added CC||libreoffice@lists.freedeskt ||op.org --- Comment #2 from Björn Michaelsen bjoern.michael...@canonical.com --- adding LibreOffice developer list as CC to unresolved EasyHacks for better visibility. see e.g. http://nabble.documentfoundation.org/minutes-of-ESC-call-td4076214.html for details -- You are receiving this mail because: You are on the CC list for the bug. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-bugs] [Bug 67208] Horizontal rules in old documents are broken: only links in the files
https://bugs.freedesktop.org/show_bug.cgi?id=67208 Björn Michaelsen bjoern.michael...@canonical.com changed: What|Removed |Added CC||libreoffice@lists.freedeskt ||op.org --- Comment #2 from Björn Michaelsen bjoern.michael...@canonical.com --- adding LibreOffice developer list as CC to unresolved EasyHacks for better visibility. see e.g. http://nabble.documentfoundation.org/minutes-of-ESC-call-td4076214.html for details -- You are receiving this mail because: You are the assignee for the bug. ___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 67208] Horizontal rules in old documents are broken: only links in the files
https://bugs.freedesktop.org/show_bug.cgi?id=67208 --- Comment #1 from Cédric Bosdonnat cedric.bosdonnat@free.fr --- Created attachment 82857 -- https://bugs.freedesktop.org/attachment.cgi?id=82857action=edit a sample file containing rules. -- You are receiving this mail because: You are the assignee for the bug. ___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 67208] Horizontal rules in old documents are broken: only links in the files
https://bugs.freedesktop.org/show_bug.cgi?id=67208 Cédric Bosdonnat cedric.bosdonnat@free.fr changed: What|Removed |Added Whiteboard||EasyHack ||DifficultyInteresting -- You are receiving this mail because: You are the assignee for the bug. ___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 67208] Horizontal rules in old documents are broken: only links in the files
https://bugs.freedesktop.org/show_bug.cgi?id=67208 Michael Meeks michael.me...@novell.com changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever confirmed|0 |1 -- You are receiving this mail because: You are the assignee for the bug. ___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs