summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/tabvwshe.cxx
diff options
context:
space:
mode:
authorNiklas Nebel <nn@openoffice.org>2001-08-20 16:04:25 +0000
committerNiklas Nebel <nn@openoffice.org>2001-08-20 16:04:25 +0000
commit557d43c666d22ffa0c329cf33490d036034613af (patch)
treeb44b2c8a1b7aff0b160bb866eedca505c033aa46 /sc/source/ui/view/tabvwshe.cxx
parent2c4df0a7fd608a020bcc74652c35126e5de17f05 (diff)
#91216# InsertURL: InsertBookmark if view is not active
Diffstat (limited to 'sc/source/ui/view/tabvwshe.cxx')
-rw-r--r--sc/source/ui/view/tabvwshe.cxx23
1 files changed, 19 insertions, 4 deletions
diff --git a/sc/source/ui/view/tabvwshe.cxx b/sc/source/ui/view/tabvwshe.cxx
index e69b5c29ae46..fe0c9d50e17a 100644
--- a/sc/source/ui/view/tabvwshe.cxx
+++ b/sc/source/ui/view/tabvwshe.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: tabvwshe.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: nn $ $Date: 2001-05-09 12:52:26 $
+ * last change: $Author: nn $ $Date: 2001-08-20 17:04:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -163,8 +163,23 @@ void ScTabViewShell::InsertURL( const String& rName, const String& rURL, const S
if ( bAsText )
{
- // InsertBookmark ?
- InsertURLField( rName, rURL, rTarget );
+ if ( GetViewData()->IsActive() )
+ {
+ // if the view is active, always use InsertURLField, which starts EditMode
+ // and selects the URL, so it can be changed from the URL bar / dialog
+
+ InsertURLField( rName, rURL, rTarget );
+ }
+ else
+ {
+ // #91216# if the view is not active, InsertURLField doesn't work
+ // -> use InsertBookmark to directly manipulate cell content
+ // bTryReplace=TRUE -> if cell contains only one URL, replace it
+
+ USHORT nPosX = GetViewData()->GetCurX();
+ USHORT nPosY = GetViewData()->GetCurY();
+ InsertBookmark( rName, rURL, nPosX, nPosY, &rTarget, TRUE );
+ }
}
else
{