]> git.lyx.org Git - features.git/commitdiff
Note to self: `!' is not the complement-to-one operator...
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sun, 25 May 2008 21:01:27 +0000 (21:01 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sun, 25 May 2008 21:01:27 +0000 (21:01 +0000)
This allows me to revert a 3 years old commit from Juergen that I never
managed to understand before.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24937 a592a061-630c-0410-9148-cb99ea01b6c8

src/FuncStatus.cpp
src/Text3.cpp

index 17e59e677ded3666dfb11a794b1d020f6305f2b4..f7b529b856056094394910345459edbdfa9b7b05 100644 (file)
@@ -41,7 +41,7 @@ void FuncStatus::unknown(bool b)
        if (b)
                v_ |= UNKNOWN;
        else
-               v_ &= !UNKNOWN;
+               v_ &= ~UNKNOWN;
 }
 
 
@@ -55,7 +55,7 @@ bool FuncStatus::unknown() const
 void FuncStatus::enabled(bool b)
 {
        if (b)
-               v_ &= !DISABLED;
+               v_ &= ~DISABLED;
        else
                v_ |= DISABLED;
 }
index 55785ffb50dcf8aebbc1acda81775a1125d843f0..798336c678d0271c06093c9056b9cf46723b64f3 100644 (file)
@@ -2073,27 +2073,27 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
 
        case LFUN_FONT_EMPH:
                flag.setOnOff(fontinfo.emph() == FONT_ON);
-               return true;
+               break;
 
        case LFUN_FONT_NOUN:
                flag.setOnOff(fontinfo.noun() == FONT_ON);
-               return true;
+               break;
 
        case LFUN_FONT_BOLD:
                flag.setOnOff(fontinfo.series() == BOLD_SERIES);
-               return true;
+               break;
 
        case LFUN_FONT_SANS:
                flag.setOnOff(fontinfo.family() == SANS_FAMILY);
-               return true;
+               break;
 
        case LFUN_FONT_ROMAN:
                flag.setOnOff(fontinfo.family() == ROMAN_FAMILY);
-               return true;
+               break;
 
        case LFUN_FONT_TYPEWRITER:
                flag.setOnOff(fontinfo.family() == TYPEWRITER_FAMILY);
-               return true;
+               break;
 
        case LFUN_CUT:
        case LFUN_COPY: