apply template in LibreOffice Writer to existing document - libreoffice

is there a way to apply a template to an existing document?
It only seems to work when I create a completely new document, and i don't want to copy&paste everything.

I'm searching for the same solution. The only thing I've found is a LibreOffice extension to do it. I just tested it and it worked, only I had to add the .oxt extension after downloading it.
Template Changer
p.s. As this was not a programming question, it may not be appropriate for this site.

Simple solution without installing an extension:
Create a new document in the desired template.
From the menu, choose Insert -> Text from file ... and select the document you would like to transfer to the new template.
Then the old document appears in the new template.

The answer from LaTechneuse no longer seems to apply (2020-08-09, v. 5.4.4.2). There is no such option under "Insert"...
However there is an option Insert --> Document. This seems to do the same thing. No doubt the menu command's name was changed because it was felt that LibreOffice users were having it too easy. Never waste an opportunity to confuse people needlessly and cause them to waste their time.

Neither template changer worked nor could I find one of the options that should reside in Insert->...
However, I used manage templates to import the new template and then in the presentation to change, in the sidebar the master slide view.
And it worked!

Related

Can Emmet Be Used to Create FXML?

I have a scalaFX app that currently has its views created programmatically. I am wondering if I can use the Emmet tool to create FXML (particularly ScalaFXML) because I want to recreate my views in ScalaFXML to separate my views from my controllers more effectively. I have searched the internet and cannot find out if this is possible. So far I have only used Emmet for HTML. Thanks in advance for the help!
I have been looking around for something for PrimeFaces; I had trouble finding anything. I guess maybe it's because people who are using it are actually writing "normal" HTML with JS frameworks.
The good news is, it's completely (and easily!) customizable: just find the installation directory, and edit the "snippets.json" file, or create a new one called (for example) snippets-scalaFX.json. Mine on a Windows 10 machine, installed as a plugin for NPP, was C:\Program Files (x86)\Notepad++\plugins\EmmetNPP\emmet\snippets.json.
It's pretty obvious once you get in there, but inside the "snippets" object just add some more fields for yourself. For example, to make a PrimeFaces commandButton tag I added:
"pc": "p:commandButton"
You can use $0 or ${<placeholder text>} to define tabstops for expanded snippets, and | to define the caret starting point.
Full docs on editing snippets are here.

Is there a way in (DocumentFormat.OpenXml.Wordprocessing) to write protect a paragraph?

I understand you can protect the whole document with something like this: myDocument.ExtendedFilePropertiesPart.Properties.DocumentSecurity= new DocumentSecurity("4");
Is there a way to do the same, but to just a single paragraph ?
-thanks in advance
Yes, although I'm on a mobile device and can't check the exact syntax at the moment. But you can find it, yourself.
Start a new document, fairly simple content. In the Word application go to the Developer tab. There's a group/button "Restrict Editing" / "Protect document" (depending on the version of Word). That displays a task pane where you can define the kind of restriction. Select everything BUT the paragraph, then from Step 2 choose "Read-only" (or something like that - not protect for comments or form fields). Make the selection editable for "everyone". In the next step, activate the protection.
Once you have this working, open the document in the Open XML SDK Productivity Tool and you can inspect the underlying Word Open XML syntax. Plus, if you're using the SDK (that's not clear from your question) it will also show you the code for generating the document.

Moodle translation doesn't work

I'm trying to translate file in moodle>>languages.
I changed english text for polish alternative text and it's not working , I already purged moodle cache , cache from browser and checked in database.mdl_tool_customlang . Everything looks ok but not working.
How to repair moodle to get languages from customlang sql database ?
I think you need to install the Polish language pack first
http://docs.moodle.org/26/en/Language_packs
Then edit them via language customisation
http://docs.moodle.org/26/en/Language_customization
Are you using the language customization tool (/admin/tool/customlang/index.php) to customize the translations? Because that's how it should be done. If you're changing it directly in the database or translation file (found in moodledata/lang/pl), it might not work correctly.
When using the customization tool, make sure you not only click on "Apply changes and continue editing" but also on "Save changes to the language pack".
One pitfall that I sometimes run into is editing the wrong text. Sometimes there are more than just one strings that contain the text to be edited and I'm changing the wrong one.
You'll need to purge the moodle cache.
Most versions have a link at the bottom that will allow you to do this. If not, look at:
https://docs.moodle.org/29/en/Caching

Which eclipse listener should I use to add annotations to a text editor

I am an eclipse newbie. I have a long term goal which is to add my own annotations to the java editor: a bit like FindBugs. I want my own static code analysers, and to be able to add markers/annotations to resources.
So I have read a lot of excellent documentation, and undertaken a load of tutorials. The most helpful was probably http://www.ibm.com/developerworks/opensource/tutorials/os-ecl-commplgin2/section9.html. A lot of the Lars Vogel documents have been useful too. I can now make TextEditors with syntax highlighters. I am however struggling with the best approach for adding annotations.
I understand roughly how to do this: the text editor has a DocumentProvider. The DocumentProvider has an AnnotationModel. It is possible to add annotations to the annotation model.
My question is "where do I put this code" specifically the code that scans the text in the editor and updates the annotation model. It seems clear that this should be in response to a listener...but which one?
I have tried a ResourceChangeListener. This seems to only fire on a save option, rather than when text is typed. In addition I don't know how to get the editor from the resource. ("The" editor is probably a misnomer as presumably the resource can be open in multiple editors). I can find the current editor via IWorkbenchWindow activeWorkbenchWindow = workbench.getActiveWorkbenchWindow().getActivePage().getActiveEditor(), but this seems the wrong approach, as I want to update all relevant annotation models.
I have tried adding an ElementStateListener to the text editor. None of the events seem to be the one I want.
I've looked at DamageRepairers...these seem to nearly be what I want, except that long term I want to tie into the JavaEditor, so I don't want to change the default DamageRepair.
Thanks for all the help
I found that this question can be answered, by mentioning the following resource: www.ibm.com/developerworks/opensource/tutorials/os-eclipse-plugin-guide/index.html
The question author also mentions here:
I add the annotations to the resource, and the annotations are
auto-magically added to the editor.
So when my plugin starts I run through the active resources, add
annotations to them if needed, then add a resource changed listener
which adds them as the resource is opened.

How to apply own template on Joomla? [duplicate]

Joomla is pretty good CMS but, is there any way to create custom template which will be joomla supportable ?
If I understand your question you want to convert an existing template that isn't even a Joomla template. If that is the case I found it very hard to do, of course depending on where the template was coming from. I ended up taking a template for Joomla 1.5 and starting from that. (Although the ja_Purity is a messy one when it comes to the CSS, looking back I would should have started with another one....)
Yes, you can do it. Copy default template which comes with Joomla and customize it, and you can install it now.
Refer : http://docs.joomla.org/Joomla!_1.5_Template_Tutorials_Project
Follow the SiteGround tutorial.
1st result for Google: joomla change template.
If you mean a page-specific template, then this is answered here: http://docs.joomla.org/How_do_you_assign_a_template_to_a_specific_page%3F
It describes the following steps:
In Joomla! there is a default
template, but you can assign other
templates to specific "pages" that are
defined by menu links.
To assign a template to a page, you
must first make sure that there is a
direct menu link to the page.
Go to Extensions>>Template Manager
Select the Template and click the edit icon (or click the template name)
In the left column, change "None" to "Select from List."
Select the links you want to apply the template to.
Save
Note that you cannot assign the
default template to individual pages.