diff options
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/lldockablefloater.cpp | 10 | ||||
-rw-r--r-- | indra/llui/lldockablefloater.h | 1 | ||||
-rw-r--r-- | indra/llui/lllineeditor.cpp | 27 | ||||
-rw-r--r-- | indra/llui/lllineeditor.h | 4 | ||||
-rw-r--r-- | indra/llui/llresizehandle.cpp | 6 | ||||
-rw-r--r-- | indra/llui/lltabcontainer.cpp | 2 | ||||
-rw-r--r-- | indra/llui/lltextbase.cpp | 8 |
7 files changed, 37 insertions, 21 deletions
diff --git a/indra/llui/lldockablefloater.cpp b/indra/llui/lldockablefloater.cpp index 9a2f2ab4d3..9c69e4f2b6 100644 --- a/indra/llui/lldockablefloater.cpp +++ b/indra/llui/lldockablefloater.cpp @@ -206,16 +206,6 @@ void LLDockableFloater::draw() LLFloater::draw(); } -void LLDockableFloater::reshape(S32 width, S32 height, BOOL called_from_parent) -{ - if (isDocked()) - { - setDocked(false); - } - - LLFloater::reshape(width, height, called_from_parent); -} - void LLDockableFloater::setDockControl(LLDockControl* dockControl) { mDockControl.reset(dockControl); diff --git a/indra/llui/lldockablefloater.h b/indra/llui/lldockablefloater.h index e5f94dca91..46491d8a29 100644 --- a/indra/llui/lldockablefloater.h +++ b/indra/llui/lldockablefloater.h @@ -65,7 +65,6 @@ public: /* virtula */BOOL postBuild(); /* virtual */void setDocked(bool docked, bool pop_on_undock = true); /* virtual */void draw(); - /* virtual */void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); /** * If descendant class overrides setVisible() then it must still invoke its diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index 75905d0927..c2f91ff7e0 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -84,8 +84,8 @@ void LLLineEditor::PrevalidateNamedFuncs::declareValues() declare("non_negative_s32", LLLineEditor::prevalidateNonNegativeS32); declare("alpha_num", LLLineEditor::prevalidateAlphaNum); declare("alpha_num_space", LLLineEditor::prevalidateAlphaNumSpace); - declare("printable_not_pipe", LLLineEditor::prevalidatePrintableNotPipe); - declare("printable_no_space", LLLineEditor::prevalidatePrintableNoSpace); + declare("ascii_printable_no_pipe", LLLineEditor::prevalidateASCIIPrintableNoPipe); + declare("ascii_printable_no_space", LLLineEditor::prevalidateASCIIPrintableNoSpace); } LLLineEditor::Params::Params() @@ -2186,20 +2186,28 @@ BOOL LLLineEditor::prevalidateAlphaNumSpace(const LLWString &str) return rv; } +// Used for most names of things stored on the server, due to old file-formats +// that used the pipe (|) for multiline text storage. Examples include +// inventory item names, parcel names, object names, etc. // static -BOOL LLLineEditor::prevalidatePrintableNotPipe(const LLWString &str) +BOOL LLLineEditor::prevalidateASCIIPrintableNoPipe(const LLWString &str) { BOOL rv = TRUE; S32 len = str.length(); if(len == 0) return rv; while(len--) { - if('|' == str[len]) + llwchar wc = str[len]; + if (wc < 0x20 + || wc > 0x7f + || wc == '|') { rv = FALSE; break; } - if(!((' ' == str[len]) || LLStringOps::isAlnum((char)str[len]) || LLStringOps::isPunct((char)str[len]))) + if(!(wc == ' ' + || LLStringOps::isAlnum((char)wc) + || LLStringOps::isPunct((char)wc) ) ) { rv = FALSE; break; @@ -2209,15 +2217,19 @@ BOOL LLLineEditor::prevalidatePrintableNotPipe(const LLWString &str) } +// Used for avatar names // static -BOOL LLLineEditor::prevalidatePrintableNoSpace(const LLWString &str) +BOOL LLLineEditor::prevalidateASCIIPrintableNoSpace(const LLWString &str) { BOOL rv = TRUE; S32 len = str.length(); if(len == 0) return rv; while(len--) { - if(LLStringOps::isSpace(str[len])) + llwchar wc = str[len]; + if (wc < 0x20 + || wc > 0x7f + || LLStringOps::isSpace(wc)) { rv = FALSE; break; @@ -2232,6 +2244,7 @@ BOOL LLLineEditor::prevalidatePrintableNoSpace(const LLWString &str) return rv; } + // static BOOL LLLineEditor::prevalidateASCII(const LLWString &str) { diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h index d3daa941cf..4474963b1a 100644 --- a/indra/llui/lllineeditor.h +++ b/indra/llui/lllineeditor.h @@ -235,8 +235,8 @@ public: static BOOL prevalidateNonNegativeS32(const LLWString &str); static BOOL prevalidateAlphaNum(const LLWString &str ); static BOOL prevalidateAlphaNumSpace(const LLWString &str ); - static BOOL prevalidatePrintableNotPipe(const LLWString &str); - static BOOL prevalidatePrintableNoSpace(const LLWString &str); + static BOOL prevalidateASCIIPrintableNoPipe(const LLWString &str); + static BOOL prevalidateASCIIPrintableNoSpace(const LLWString &str); static BOOL prevalidateASCII(const LLWString &str); static BOOL postvalidateFloat(const std::string &str); diff --git a/indra/llui/llresizehandle.cpp b/indra/llui/llresizehandle.cpp index 7449c339a0..6239a8f721 100644 --- a/indra/llui/llresizehandle.cpp +++ b/indra/llui/llresizehandle.cpp @@ -135,6 +135,12 @@ BOOL LLResizeHandle::handleHover(S32 x, S32 y, MASK mask) LLView* resizing_view = getParent(); if( resizing_view ) { + // undock floater when user resize it + if (((LLFloater*)getParent())->isDocked()) + { + ((LLFloater*)getParent())->setDocked(false, false); + } + // Resize the parent LLRect orig_rect = resizing_view->getRect(); LLRect scaled_rect = orig_rect; diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index 44eff8d357..f5d8174820 100644 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -391,7 +391,7 @@ void LLTabContainer::draw() mNextArrowBtn->setFlashing( TRUE ); } } - }
+ } idx++; } diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index caaf47240f..cd795282f9 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -2380,6 +2380,14 @@ bool LLNormalTextSegment::getDimensions(S32 first_char, S32 num_chars, S32& widt width = mStyle->getFont()->getWidth(text.c_str(), mStart + first_char, num_chars); // if last character is a newline, then return true, forcing line break llwchar last_char = text[mStart + first_char + num_chars - 1]; + + LLUIImagePtr image = mStyle->getImage(); + if( image.notNull()) + { + width += image->getWidth(); + height = llmax(height, image->getHeight()); + } + return num_chars >= 1 && last_char == '\n'; } |