Electrical borehole imaging tools acquire high-resolution microresistivity maps of the borehole wall, revealing critical sedimentary and structural features for reservoir characterization. However, these microresistivity borehole image logs (BHIs) often contain regularly spaced unmeasured intervals due to the intrinsic gaps between the measuring electrode pads, which hinders effective BHI interpretation. Traditional inpainting methods, such as multipoint statistics and morphological component analysis, require extensive iterative processing and often fail in complex formations. Therefore, we develop a deep neural network trained in a self-supervised manner to enhance the efficiency and accuracy of BHI inpainting. This network incorporates a masked image modeling algorithm into the Swin Transformer model, focusing computation exclusively on valid pixels to eliminate inpainting artifacts and boost efficiency. The new model, named Masked-SwinUnet, leverages the known ground truth at artificially masked gaps in the measured stripes during training. It has successfully achieved seamless inpainting on data acquired by Schlumberger's Fullbore Formation MicroImager from the Integrated Ocean Drilling Program, effectively restoring global sinusoidal features and local textures. This novel inpainting technique holds great potential for enhancing automatic BHI interpretation and reservoir characterization.