Create Fluffy Blocks
Perl, 448 bytes

$_=&lt;&gt;;$o=$_;~y/-|/Aa/;$N=$_;while($n ne $N){$n=$N;$c=$N;$M=$c;while($c=~s/^(.*?;)??([aA]*?)aA([aA]*)Aa(.*;(?i)\2)aA((?i)\3)Aa(.*)$/\L\1\2\UAA\3AA\L\4\UAA\5AA\L\6/){if($N eq $n){substr($N,(length $1)+(length $2),1)="X"}substr($M,-(length $6)-1,1)="X";$c=~s/^([xa;]*;)?(a*)A(A*)A(a*;)\2a((?i)\3)a/\1\2A\3A\4\2A\5A/;1 while $c=~s/(^|;)(a*)A(a*)A(a*;)\2a((?i)\3)a/\1\2A\3A\4\2A\5A/;while($c=~/A/g){substr($o,(pos $c)-1,1)="o"}$c=$M}}$o=~y/;/\n/;print$o


I haven't used perl before so there's going to be massive room for improvement here (especially since I was mostly glad to get it working, so haven't tried to optimise it yet). I was a bit disappointed that the regular expression language didn't have some of the features I wanted, but I think it does pretty well.

Usage

Takes input on stdin, with lines semicolon-separated (optionally add a semicolon to the end to make the final printed output end with a newline). Outputs to stdout. Example command:

printf -- "-|--|--|;|||-|--|;-|-----|;" | perl boxes.perl


Breakdown

$_=&lt;&gt;; # Load input
$o=$_; # Create output variable
~y/-|/Aa/; # Replace - and | with A and a so that we can use case insensitive tricks later
$N=$_;
# For each distinct top-left corner...
while($n ne $N){
    $n=$N;
    $c=$N;
    $M=$c;
    # For each distinct box...
    while($c=~s/^(.*?;)??([aA]*?)aA([aA]*)Aa(.*;(?i)\2)aA((?i)\3)Aa(.*)$/\L\1\2\UAA\3AA\L\4\UAA\5AA\L\6/){
        if($N eq $n){
            # mark top-left corner used (x)
            substr($N,(length $1)+(length $2),1)="X"
        }
        # mark bottom-right corner used (x)
        substr($M,-(length $6)-1,1)="X";

        # Fill in sides of identified box
        $c=~s/^([xa;]*;)?(a*)A(A*)A(a*;)\2a((?i)\3)a/\1\2A\3A\4\2A\5A/;
        1 while $c=~s/(^|;)(a*)A(a*)A(a*;)\2a((?i)\3)a/\1\2A\3A\4\2A\5A/;

        # Replace output chars with "o" where box was found
        while($c=~/A/g){
            substr($o,(pos $c)-1,1)="o"
        }

        # Continue to next box
        $c=$M
    }
}

# Convert to nice output &amp; print
$o=~y/;/\n/;
print$o