Sorry to hear about the break in, but I am glad to hear that you had renters' insurance. Far too many tenants do not take the care to invest a small amount each month to protect them from just this type of occurrence. I recommend giving your insurer a call and putting in a claim.
I agree that the carpet damage was the fault of the burglar, but it was not the fault of the landlord either. The premises were broken into while you were in possession and control of the apartment. A "slider bar lock" is not a complex or expensive piece of technology that the landlord would have to provide you. It is basically a sawed off broom handle. In my opinion you are responsible for the costs of repair, but your insurer should cover the property damage just as it covered your personal property losses.
The above is opinion based on very limited facts and not legal advice. This is not a substitute for a consultation with an attorney and does not constitute the establishment of an attorney/client relationship.
File a claim with your renter's insurance carrier.
DISCLAIMER: Brandy A. Peeples is licensed to practice law in the State of Maryland. This answer is being provided for informational purposes only and the laws of your jurisdiction may differ. This answer based on general legal principles and is not intended for the purpose of providing specific legal advice or opinions. Under no circumstances does this answer constitute the establishment of an attorney-client relationship. For legal advice relating to your specific situation, I strongly urge you to consult with an attorney in your area. NO COMMUNICATIONS WITH ME ARE TO BE CONSTRUED AS ARISING FROM AN ATTORNEY-CLIENT RELATIONSHIP AND NO ATTORNEY-CLIENT RELATIONSHIP WILL BE ESTABLISHED WITH ME UNLESS I HAVE EXPRESSLY AGREED TO UNDERTAKE YOUR REPRESENTATION, WHICH INCLUDES THE EXECUTION OF A WRITTEN AGREEMENT OF RETAINER.