Adjust margin: Chapter title extends in left margin

I am using a custom document class and template for my thesis. Both can be found here (they are really long, otherwise I'd copy and paste): https://wiki.cites.illinois.edu/wiki/display/ECEThesisReview/LaTeX+Resources

Here's my problem: I set my margins using

\usepackage{geometry}
\geometry{verbose,tmargin=1in,bmargin=1in,lmargin=1in,rmargin=1in}


Whenever I declare the option

\documentclass[12pt,tocnosub,fancy,offcenter]{uiucecethesis09}


in the preamble, the chapter number violates the my College dissertation rules that no content may extend into the one-inch margins.

How do I modify the class file so that the chapter numbers are within the one-inch margin, i.e. move the chapter number and title over by about an inch so that it aligns to the one-inch margin?

The 'offending' code is a \llap in the \@makechapterhead macro, within the \if@thesisfancy branch, causing the left indentation into the margin. This can be removed by applying a patch at the relevant place.

Edit This does not work if the chapter title is longer than the textwidth (minus the width of the chapter number figure) (so far)

\documentclass[12pt,tocnosub,fancy,offcenter]{uiucecethesis09}

\usepackage{geometry}

\geometry{verbose,tmargin=1in,bmargin=1in,lmargin=1in,rmargin=1in}
\usepackage{blindtext}
\usepackage{xpatch}

\makeatletter
\makeatother

\begin{document}

\chapter{First}
\blindtext
\end{document}


• even if it's a bad idea, can you think in the case where chapter title is so long. – touhami Apr 23 '15 at 6:32
• @touhami: I see what you mean. I'll try to figure out – user31729 Apr 23 '15 at 6:33
• my be a minipage in the definition of \capchaptitle does the job. – touhami Apr 23 '15 at 7:09
• @touhami: I thought of a parbox, so it's similar. I have no time to figure it out right now, I am actually in a meeting ;-) Feel free to go ahead – user31729 Apr 23 '15 at 7:10
• add this if you can \xpatchcmd{\@makechapterhead}{\chaptertitlefont \capchaptitle}{\parbox{.85\textwidth}{\chaptertitlefont \capchaptitle}}{}{} I don't want to mangling your answer – touhami Apr 23 '15 at 13:39

This is just an add to christian Hupfer's answer, in case, there is long title of chapter (but i think it is bad idea: long text in uppercase)

\documentclass[12pt,tocnosub,fancy,offcenter]{uiucecethesis09}

\usepackage{geometry}

\geometry{verbose,tmargin=1in,bmargin=1in,lmargin=1in,rmargin=1in}
\usepackage{blindtext}
\usepackage{xpatch}

\makeatletter