A legal or Shar'ee swear will not take place unless it is in one of the names of God or one of His attributes.
It means that swearing to Quran or the name of Prophet or Imams will not end in a Shar'ee swear and if someone does something against that swear, they should not pay Kaffarah.
Of course we all know that saying lies even without swearing is Haraam and one must refrain from that.