aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHumdinger <humdingerb@gmail.com>2012-07-25 19:16:11 +0200
committerHumdinger <humdingerb@gmail.com>2012-07-25 19:16:11 +0200
commit48249b20646d5a6a58b084eee73827953df407ca (patch)
tree942019f2ae6870c71edcd2e263c60f39f28a7fd0
parenta736c8aa6bdaaba029f8f651f6018422697478e9 (diff)
Stylefixes, no functional change.hrev44406
-rw-r--r--src/apps/stylededit/ColorMenuItem.cpp5
-rw-r--r--src/apps/stylededit/ColorMenuItem.h4
-rw-r--r--src/apps/stylededit/Constants.h8
-rw-r--r--src/apps/stylededit/FindWindow.h5
-rw-r--r--src/apps/stylededit/ReplaceWindow.cpp2
-rw-r--r--src/apps/stylededit/ReplaceWindow.h6
-rw-r--r--src/apps/stylededit/StyledEditApp.cpp6
-rw-r--r--src/apps/stylededit/StyledEditView.cpp9
-rw-r--r--src/apps/stylededit/StyledEditView.h6
-rw-r--r--src/apps/stylededit/StyledEditWindow.cpp13
-rw-r--r--src/apps/stylededit/StyledEditWindow.h10
11 files changed, 39 insertions, 35 deletions
diff --git a/src/apps/stylededit/ColorMenuItem.cpp b/src/apps/stylededit/ColorMenuItem.cpp
index 923bdcd816..863a2afcd5 100644
--- a/src/apps/stylededit/ColorMenuItem.cpp
+++ b/src/apps/stylededit/ColorMenuItem.cpp
@@ -11,7 +11,8 @@
#include <Message.h>
-ColorMenuItem::ColorMenuItem(const char *label, rgb_color color, BMessage *message)
+ColorMenuItem::ColorMenuItem(const char *label, rgb_color color,
+ BMessage *message)
: BMenuItem(label, message, 0, 0),
fItemColor(color)
{
@@ -21,7 +22,7 @@ ColorMenuItem::ColorMenuItem(const char *label, rgb_color color, BMessage *messa
void
ColorMenuItem::DrawContent()
{
- BMenu *menu = Menu();
+ BMenu* menu = Menu();
if (menu) {
rgb_color menuColor = menu->HighColor();
diff --git a/src/apps/stylededit/ColorMenuItem.h b/src/apps/stylededit/ColorMenuItem.h
index 257d91cb78..45b4715cd6 100644
--- a/src/apps/stylededit/ColorMenuItem.h
+++ b/src/apps/stylededit/ColorMenuItem.h
@@ -18,8 +18,8 @@ class BMessage;
class ColorMenuItem: public BMenuItem {
public:
- ColorMenuItem(const char *label, rgb_color color,
- BMessage *message);
+ ColorMenuItem(const char* label, rgb_color color,
+ BMessage* message);
protected:
virtual void DrawContent();
diff --git a/src/apps/stylededit/Constants.h b/src/apps/stylededit/Constants.h
index cbd4776a0d..7863a1a60f 100644
--- a/src/apps/stylededit/Constants.h
+++ b/src/apps/stylededit/Constants.h
@@ -54,10 +54,10 @@ const uint32 kMsgSetBold = 'Fbld';
// fontcolors
const rgb_color BLACK = {0, 0, 0, 255};
const rgb_color RED = {255, 0, 0, 255};
-const rgb_color GREEN = {0, 255, 0, 255};
-const rgb_color BLUE = {0, 0, 255, 255};
-const rgb_color CYAN = {0, 255, 255, 255};
-const rgb_color MAGENTA = {255, 0, 255, 255};
+const rgb_color GREEN = {0, 255, 0, 255};
+const rgb_color BLUE = {0, 0, 255, 255};
+const rgb_color CYAN = {0, 255, 255, 255};
+const rgb_color MAGENTA = {255, 0, 255, 255};
const rgb_color YELLOW = {255, 255, 0, 255};
// "Document"-menu
diff --git a/src/apps/stylededit/FindWindow.h b/src/apps/stylededit/FindWindow.h
index f63dc879af..e8720c8434 100644
--- a/src/apps/stylededit/FindWindow.h
+++ b/src/apps/stylededit/FindWindow.h
@@ -20,8 +20,9 @@ class BTextControl;
class FindWindow : public BWindow {
public:
- FindWindow(BRect frame, BHandler* handler, BString *searchString,
- bool caseState, bool wrapState, bool backState);
+ FindWindow(BRect frame, BHandler* handler,
+ BString* searchString, bool caseState,
+ bool wrapState, bool backState);
virtual void MessageReceived(BMessage* message);
virtual void DispatchMessage(BMessage* message, BHandler* handler);
diff --git a/src/apps/stylededit/ReplaceWindow.cpp b/src/apps/stylededit/ReplaceWindow.cpp
index b35e28f046..9b63c5be4c 100644
--- a/src/apps/stylededit/ReplaceWindow.cpp
+++ b/src/apps/stylededit/ReplaceWindow.cpp
@@ -29,7 +29,7 @@
#define B_TRANSLATION_CONTEXT "FindandReplaceWindow"
ReplaceWindow::ReplaceWindow(BRect frame, BHandler* _handler,
- BString* searchString, BString *replaceString,
+ BString* searchString, BString* replaceString,
bool caseState, bool wrapState, bool backState)
: BWindow(frame, "ReplaceWindow", B_MODAL_WINDOW,
B_NOT_RESIZABLE | B_ASYNCHRONOUS_CONTROLS | B_AUTO_UPDATE_SIZE_LIMITS,
diff --git a/src/apps/stylededit/ReplaceWindow.h b/src/apps/stylededit/ReplaceWindow.h
index bb51f057c6..ddcff4c23c 100644
--- a/src/apps/stylededit/ReplaceWindow.h
+++ b/src/apps/stylededit/ReplaceWindow.h
@@ -23,12 +23,12 @@ class BTextControl;
class ReplaceWindow : public BWindow {
public:
- ReplaceWindow(BRect frame, BHandler *_handler,
- BString *searchString, BString *replaceString,
+ ReplaceWindow(BRect frame, BHandler* _handler,
+ BString* searchString, BString* replaceString,
bool caseState, bool wrapState, bool backState);
virtual void MessageReceived(BMessage* message);
- virtual void DispatchMessage(BMessage* message, BHandler *handler);
+ virtual void DispatchMessage(BMessage* message, BHandler* handler);
private:
void _SendMessage(uint32 what);
diff --git a/src/apps/stylededit/StyledEditApp.cpp b/src/apps/stylededit/StyledEditApp.cpp
index ff66954e17..49294e9927 100644
--- a/src/apps/stylededit/StyledEditApp.cpp
+++ b/src/apps/stylededit/StyledEditApp.cpp
@@ -32,7 +32,7 @@
using namespace BPrivate;
-BRect gWindowRect(7-15, 26-15, 507, 426);
+BRect gWindowRect(7 - 15, 26 - 15, 507, 426);
namespace
@@ -117,8 +117,8 @@ StyledEditApp::StyledEditApp()
name.Append(mime);
name.Append(")");
}
- BMenuItem* item =
- new BMenuItem(name.String(), new BMessage(OPEN_AS_ENCODING));
+ BMenuItem* item
+ = new BMenuItem(name.String(), new BMessage(OPEN_AS_ENCODING));
item->SetTarget(this);
fOpenPanelEncodingMenu->AddItem(item);
if (charset.GetFontID() == fOpenAsEncoding)
diff --git a/src/apps/stylededit/StyledEditView.cpp b/src/apps/stylededit/StyledEditView.cpp
index 66b871db5f..10258247e6 100644
--- a/src/apps/stylededit/StyledEditView.cpp
+++ b/src/apps/stylededit/StyledEditView.cpp
@@ -30,7 +30,8 @@
using namespace BPrivate;
-StyledEditView::StyledEditView(BRect viewFrame, BRect textBounds, BHandler *handler)
+StyledEditView::StyledEditView(BRect viewFrame, BRect textBounds,
+ BHandler* handler)
: BTextView(viewFrame, "textview", textBounds,
B_FOLLOW_ALL, B_FRAME_EVENTS | B_WILL_DRAW)
{
@@ -162,7 +163,7 @@ StyledEditView::GetEncoding() const
const BCharacterSet* set =
BCharacterSetRoster::FindCharacterSetByName(fEncoding.String());
- if(set != NULL)
+ if (set != NULL)
return set->GetFontID();
return 0;
@@ -181,8 +182,8 @@ StyledEditView::DeleteText(int32 start, int32 finish)
void
-StyledEditView::InsertText(const char *text, int32 length, int32 offset,
- const text_run_array *runs)
+StyledEditView::InsertText(const char* text, int32 length, int32 offset,
+ const text_run_array* runs)
{
if (!fSuppressChanges)
fMessenger->SendMessage(TEXT_CHANGED);
diff --git a/src/apps/stylededit/StyledEditView.h b/src/apps/stylededit/StyledEditView.h
index 945f34dda3..b0482fb13e 100644
--- a/src/apps/stylededit/StyledEditView.h
+++ b/src/apps/stylededit/StyledEditView.h
@@ -23,14 +23,14 @@ class BPositionIO;
class StyledEditView : public BTextView {
public:
StyledEditView(BRect viewframe, BRect textframe,
- BHandler *handler);
+ BHandler* handler);
virtual ~StyledEditView();
virtual void Select(int32 start, int32 finish);
virtual void DeleteText(int32 start, int32 finish);
virtual void FrameResized(float width, float height);
- virtual void InsertText(const char *text, int32 length, int32 offset,
- const text_run_array *runs = NULL);
+ virtual void InsertText(const char* text, int32 length, int32 offset,
+ const text_run_array* runs = NULL);
void Reset();
void SetSuppressChanges(bool suppressChanges);
diff --git a/src/apps/stylededit/StyledEditWindow.cpp b/src/apps/stylededit/StyledEditWindow.cpp
index 37fa6ac150..61e7c1a6c9 100644
--- a/src/apps/stylededit/StyledEditWindow.cpp
+++ b/src/apps/stylededit/StyledEditWindow.cpp
@@ -862,7 +862,8 @@ StyledEditWindow::Print(const char* documentName)
int32 currentLine = 0;
while (currentLine < linesInDocument) {
float currentHeight = 0;
- while (currentHeight < printableRect.Height() && currentLine < linesInDocument) {
+ while (currentHeight < printableRect.Height() && currentLine
+ < linesInDocument) {
currentHeight += fTextView->LineHeight(currentLine);
if (currentHeight < printableRect.Height())
currentLine++;
@@ -1027,8 +1028,8 @@ StyledEditWindow::_InitWindow(uint32 encoding)
new BMessage(MENU_NEW), 'N'));
menuItem->SetTarget(be_app);
- menu->AddItem(menuItem = new BMenuItem(fRecentMenu =
- new BMenu(B_TRANSLATE("Open" B_UTF8_ELLIPSIS)),
+ menu->AddItem(menuItem = new BMenuItem(fRecentMenu
+ = new BMenu(B_TRANSLATE("Open" B_UTF8_ELLIPSIS)),
new BMessage(MENU_OPEN)));
menuItem->SetShortcut('O', 0);
menuItem->SetTarget(be_app);
@@ -1042,8 +1043,8 @@ StyledEditWindow::_InitWindow(uint32 encoding)
menuItem->SetShortcut('S', B_SHIFT_KEY);
menuItem->SetEnabled(true);
- menu->AddItem(fRevertItem =
- new BMenuItem(B_TRANSLATE("Revert to saved" B_UTF8_ELLIPSIS),
+ menu->AddItem(fRevertItem
+ = new BMenuItem(B_TRANSLATE("Revert to saved" B_UTF8_ELLIPSIS),
new BMessage(MENU_REVERT)));
fRevertItem->SetEnabled(false);
menu->AddItem(new BMenuItem(B_TRANSLATE("Close"),
@@ -1505,7 +1506,7 @@ StyledEditWindow::_ReplaceAll(BString findThis, BString replaceWith,
fTextView->SetSuppressChanges(true);
// start from the beginning of text
- fTextView->Select(0,0);
+ fTextView->Select(0, 0);
int32 start, finish;
diff --git a/src/apps/stylededit/StyledEditWindow.h b/src/apps/stylededit/StyledEditWindow.h
index d107917b1b..19f0ad8bf8 100644
--- a/src/apps/stylededit/StyledEditWindow.h
+++ b/src/apps/stylededit/StyledEditWindow.h
@@ -118,17 +118,17 @@ private:
BString fReplaceString;
// undo modes
- bool fUndoFlag; // we just did an undo action
- bool fCanUndo; // we can do an undo action next
- bool fRedoFlag; // we just did a redo action
- bool fCanRedo; // we can do a redo action next
+ bool fUndoFlag; // we just did an undo action
+ bool fCanUndo; // we can do an undo action next
+ bool fRedoFlag; // we just did a redo action
+ bool fCanRedo; // we can do a redo action next
// clean modes
bool fUndoCleans;
// an undo action will put us in a clean state
bool fRedoCleans;
// a redo action will put us in a clean state
- bool fClean; // we are in a clean state
+ bool fClean; // we are in a clean state
bool fCaseSensitive;
bool fWrapAround;