Comments (7)
Lists are complicated beasts. I'll take a look. For now I'll link to old PR maybe it will give you something:
from officeimo.
I found a reason why it doesn't work. It's related to Nsid.
In the original code each list has different Nsid, but only if the list is different. If the list is the same it uses same Nsid (as it's hardcoded).
For this to work, it needs to be fixed so that Nsid is randomized or have proper numbering like NumberingInstance/AbstractNum.
I did quick hack and it works...
from officeimo.
I guess when we want to continuenumbering we will now need to refer to the original AbstractNum, instead of adding a new one...
SO when user uses WordListStyle.headingIA1, find it on the list if it's there already and if it's continueNumbering, attach to it - my guess.
from officeimo.
So when I look at how Word deals with font size it seems to be applying it to ParagraphProperties
And not to AbstractNum. Is there a reason you want it done that way?
from officeimo.
It looks like randomizing nsid
causing the continueNumbering
to fail. Created a quick test in db16983.
Need more investigation, will check later.
[Fact]
public void Test_CreatingWordDocumentWithLists3() {
var filePath = Path.Combine(_directoryWithFiles, "CreatedDocumentWithLists2.docx");
using (var doc = WordDocument.Create(filePath)) {
doc.AddParagraph("Capybaras:");
{
WordList wl = doc.AddList(WordListStyle.HeadingIA1);
wl.AddItem("Pablo");
}
{
WordList wl = doc.AddList(WordListStyle.HeadingIA1, true);
wl.AddItem("Ponyo");
}
doc.Save(true);
}
}
from officeimo.
So when I look at how Word deals with font size it seems to be applying it to ParagraphProperties
And not to AbstractNum. Is there a reason you want it done that way?
Not really, at that time I went straight to abstractnum instead of checking on a higher level (paragraph).
from officeimo.
I've now removed restart numbering/continue numbering as it makes no sense:
If you feel this is somehow wrong please let me know.
from officeimo.
Related Issues (20)
- Questions around TextBox HOT 23
- InvalidProgramException HOT 5
- Open Office Writer can't open document created with OfficeIMO HOT 17
- Add Combo Chart HOT 1
- Upgrading DocumentFormat.OpenXML to version 3 HOT 1
- dotnet 8.0 error HOT 13
- Any way to implement numbered list (a., b., c., ....)? HOT 4
- Any way to insert rich text HTML content? HOT 8
- Remove continue numbering & restart numbering for lists
- Add ability to merge & remove lists
- Image layout options HOT 8
- Mislabeled Behavior? HOT 8
- Potential Bug: Does iteration over TableCell's Paragraphs property allow mutation? HOT 21
- Stable and unlikely to change vs unstable and subject to change vs depreciated api HOT 13
- How to add paragraph without pagebreak? HOT 4
- ContentControls.Add() is trimming space from user selection HOT 1
- How to display the specific gravity value in a pie chart HOT 2
- How to add image watermark? HOT 3
- how can I add a table with two rows and each row had diff columns and width? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from officeimo.