This is an automated email from the ASF dual-hosted git repository.
mseidel pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git
The following commit(s) were added to refs/heads/AOO42X by this push:
new c1e43d34e5 Cleanup
c1e43d34e5 is described below
commit c1e43d34e51a983fd2696019bab44ef955ebb559
Author: mseidel <[email protected]>
AuthorDate: Sun Feb 16 19:20:46 2025 +0100
Cleanup
(cherry picked from commit 7362bde626a556b0ffc224247dc2b78c03cbe2fe)
---
main/basic/source/comp/loops.cxx | 31 ++--
main/sd/source/ui/dlg/LayerDialog.src | 4 +-
main/sd/source/ui/dlg/custsdlg.cxx | 52 +++---
main/sd/source/ui/dlg/morphdlg.src | 5 -
main/sd/source/ui/notes/EditWindow.cxx | 232 +++++++++++----------------
main/sd/source/ui/notes/NotesChildWindow.src | 14 +-
6 files changed, 136 insertions(+), 202 deletions(-)
diff --git a/main/basic/source/comp/loops.cxx b/main/basic/source/comp/loops.cxx
index f57eaacf95..3f754ec550 100644
--- a/main/basic/source/comp/loops.cxx
+++ b/main/basic/source/comp/loops.cxx
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,20 +7,18 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
-
-
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_basic.hxx"
@@ -39,7 +37,7 @@ void SbiParser::If()
if( IsEoln( Next() ) )
{
// AB 13.5.1996: #27720# Am Ende jeden Blocks muss ein Jump zu
ENDIF
- // eingefuegt werden, damit bei ELSEIF nicht erneut die
Bedingung
+ // eingef�gt werden, damit bei ELSEIF nicht erneut die Bedingung
// ausgewertet wird. Die Tabelle nimmt alle Absprungstellen auf.
#define JMP_TABLE_SIZE 100
sal_uInt32 pnJmpToEndLbl[JMP_TABLE_SIZE]; // 100 ELSEIFs
zulaessig
@@ -83,7 +81,7 @@ void SbiParser::If()
eTok = Peek();
if( IsEof() )
{
- Error( SbERR_BAD_BLOCK, ELSEIF );
bAbort = sal_True; return;
+ Error( SbERR_BAD_BLOCK, ELSEIF );
bAbort = sal_True; return;
}
}
}
@@ -216,7 +214,7 @@ void SbiParser::For()
TestToken( _IN_ );
SbiExpression aCollExpr( this, SbOPERAND );
aCollExpr.Gen(); // Colletion var to for stack
- TestEoln();
+ TestEoln();
aGen.Gen( _INITFOREACH );
}
else
@@ -245,7 +243,7 @@ void SbiParser::For()
}
sal_uInt32 nLoop = aGen.GetPC();
- // Test durchfuehren, evtl. Stack freigeben
+ // Test durchf�hren, evtl. Stack freigeben
sal_uInt32 nEndTarget = aGen.Gen( _TESTFOR, 0 );
OpenBlock( FOR );
StmntBlock( NEXT );
@@ -268,7 +266,7 @@ void SbiParser::With()
{
SbiExpression aVar( this, SbOPERAND );
- // Letzten Knoten in der Objekt-Kette ueberpruefen
+ // Letzten Knoten in der Objekt-Kette �berpr�fen
SbiExprNode *pNode = aVar.GetExprNode()->GetRealNode();
SbiSymDef* pDef = pNode->GetVar();
// Variant, AB 27.6.1997, #41090: bzw. empty -> mu� Object sein
@@ -277,7 +275,7 @@ void SbiParser::With()
else if( pDef->GetType() != SbxOBJECT )
Error( SbERR_NEEDS_OBJECT );
- // Knoten auch auf SbxOBJECT setzen, damit spaeter Gen() klappt
+ // Knoten auch auf SbxOBJECT setzen, damit sp�ter Gen() klappt
pNode->SetType( SbxOBJECT );
OpenBlock( NIL, aVar.GetExprNode() );
@@ -402,9 +400,9 @@ void SbiParser::Select()
SbiExpression aCompare( this );
aCompare.Gen();
nTrueTarget = aGen.Gen(
- _CASEIS, nTrueTarget,
- sal::static_int_cast< sal_uInt16 >(
- SbxEQ + ( eTok2 - EQ ) ) );
+ _CASEIS, nTrueTarget,
+ sal::static_int_cast<
sal_uInt16 >(
+ SbxEQ + ( eTok2 - EQ )
) );
}
else
{ // CASE expr | expr TO expr
@@ -502,7 +500,7 @@ void SbiParser::On()
bError_ = true;
}
if( bError_ )
- Error( SbERR_LABEL_EXPECTED );
+ Error( SbERR_LABEL_EXPECTED );
}
else if( eCurTok == RESUME )
{
@@ -552,3 +550,4 @@ void SbiParser::Resume()
}
}
+/* vim: set noet sw=4 ts=4: */
diff --git a/main/sd/source/ui/dlg/LayerDialog.src
b/main/sd/source/ui/dlg/LayerDialog.src
index 87b6d663b8..dc4ae532b9 100644
--- a/main/sd/source/ui/dlg/LayerDialog.src
+++ b/main/sd/source/ui/dlg/LayerDialog.src
@@ -19,8 +19,6 @@
*
*************************************************************/
-
-
#include "app.hrc"
#include "res_bmp.hrc"
#include "helpids.h"
@@ -45,7 +43,7 @@ DockingWindow FLT_WIN_LAYER_DIALOG
Window TB_LAYERS
{
Pos = MAP_APPFONT ( 6, 6 ) ;
- Size = MAP_APPFONT ( WIDTH-2*6, TAB_BAR_HEIGHT ) ;
+ Size = MAP_APPFONT ( WIDTH-2 * 6, TAB_BAR_HEIGHT ) ;
HelpId = HID_SD_TABBAR_LAYERS ;
BORDER = TRUE ;
SvLook = TRUE ;
diff --git a/main/sd/source/ui/dlg/custsdlg.cxx
b/main/sd/source/ui/dlg/custsdlg.cxx
index 4bed4d7ac6..4369fe9e74 100644
--- a/main/sd/source/ui/dlg/custsdlg.cxx
+++ b/main/sd/source/ui/dlg/custsdlg.cxx
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,20 +7,18 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
-
-
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sd.hxx"
@@ -40,11 +38,7 @@
#include "app.hxx"
#include <vcl/msgbox.hxx>
-
-/////////////////////
-// SdCustomShowDlg //
-/////////////////////
-
+// SdCustomShowDlg
/*************************************************************************
|* Konstruktor
@@ -58,10 +52,10 @@ SdCustomShowDlg::SdCustomShowDlg( Window* pWindow,
aBtnNew ( this, SdResId( BTN_NEW ) ),
aBtnEdit ( this, SdResId( BTN_EDIT ) ),
aBtnRemove ( this, SdResId( BTN_REMOVE ) ),
- aBtnCopy ( this, SdResId( BTN_COPY ) ),
- aBtnHelp ( this, SdResId( BTN_HELP ) ),
+ aBtnCopy ( this, SdResId( BTN_COPY ) ),
+ aBtnHelp ( this, SdResId( BTN_HELP ) ),
aBtnStartShow ( this, SdResId( BTN_STARTSHOW ) ),
- aBtnOK ( this, SdResId( BTN_OK ) ),
+ aBtnOK ( this, SdResId( BTN_OK ) ),
rDoc ( rDrawDoc ),
pCustomShowList ( NULL ),
@@ -180,7 +174,7 @@ IMPL_LINK( SdCustomShowDlg, ClickButtonHdl, void *, p )
}
}
}
- // CustomShow loeschen
+ // CustomShow löschen
else if( p == &aBtnRemove )
{
sal_uInt16 nPos = aLbCustomShows.GetSelectEntryPos();
@@ -220,7 +214,7 @@ IMPL_LINK( SdCustomShowDlg, ClickButtonHdl, void *, p )
aStr.Append( UniString::CreateFromInt32( nNum )
);
}
- // Name ueberpruefen...
+ // Name überprüfen...
sal_Bool bDifferent = sal_False;
//long nPosToSelect = pCustomShowList->GetCurPos();
while( !bDifferent )
@@ -235,7 +229,7 @@ IMPL_LINK( SdCustomShowDlg, ClickButtonHdl, void *, p )
}
if( !bDifferent )
{
- // Nummer entfernen und durch um 1
erhoehte ersetzen
+ // Nummer entfernen und durch um 1
erhöhte ersetzen
const CharClass* pCharClass =
rDoc.GetCharClass();
while( pCharClass->isDigit( aStr,
nStrPos ) )
@@ -292,17 +286,10 @@ sal_Bool SdCustomShowDlg::IsCustomShow() const
return( aCbxUseCustomShow.IsEnabled() && aCbxUseCustomShow.IsChecked()
);
}
-
-
-///////////////////////////
-// SdDefineCustomShowDlg //
-///////////////////////////
-
+// SdDefineCustomShowDlg
/*************************************************************************
-|*
|* Konstruktor
-|*
\************************************************************************/
SdDefineCustomShowDlg::SdDefineCustomShowDlg( Window* pWindow,
SdDrawDocument& rDrawDoc,
SdCustomShow*& rpCS ) :
@@ -316,9 +303,9 @@ SdDefineCustomShowDlg::SdDefineCustomShowDlg( Window*
pWindow,
aBtnRemove ( this, SdResId( BTN_REMOVE ) ),
aFtCustomPages ( this, SdResId( FT_CUSTOM_PAGES ) ),
aLbCustomPages ( this, SdResId( LB_CUSTOM_PAGES ) ),
- aBtnOK ( this, SdResId( BTN_OK ) ),
+ aBtnOK ( this, SdResId( BTN_OK ) ),
aBtnCancel ( this, SdResId( BTN_CANCEL ) ),
- aBtnHelp ( this, SdResId( BTN_HELP ) ),
+ aBtnHelp ( this, SdResId( BTN_HELP ) ),
rDoc ( rDrawDoc ),
rpCustomShow ( rpCS ),
@@ -336,7 +323,7 @@ SdDefineCustomShowDlg::SdDefineCustomShowDlg( Window*
pWindow,
aBtnOK.SetClickHdl( LINK( this, SdDefineCustomShowDlg, OKHdl ) );
SdPage* pPage;
- // Listbox mit Seitennamen des Docs fuellen
+ // Listbox mit Seitennamen des Docs füllen
for( long nPage = 0L;
nPage < rDoc.GetSdPageCount( PK_STANDARD );
nPage++ )
@@ -352,7 +339,7 @@ SdDefineCustomShowDlg::SdDefineCustomShowDlg( Window*
pWindow,
aOldName = rpCustomShow->GetName();
aEdtName.SetText( aOldName );
- // ListBox mit CustomShow-Seiten fuellen
+ // ListBox mit CustomShow-Seiten füllen
for( pPage = (SdPage*) rpCustomShow->First();
pPage != NULL;
pPage = (SdPage*) rpCustomShow->Next() )
@@ -377,9 +364,7 @@ SdDefineCustomShowDlg::SdDefineCustomShowDlg( Window*
pWindow,
}
/*************************************************************************
-|*
|* Dtor
-|*
\************************************************************************/
SdDefineCustomShowDlg::~SdDefineCustomShowDlg()
{
@@ -460,8 +445,8 @@ IMPL_LINK( SdDefineCustomShowDlg, ClickButtonHdl, void *, p
)
/*************************************************************************
|* CheckCustomShow():
-|* Ueberprueft die Page-Pointer der Show, da die Eintraege ueber die
-|* TreeLB verschoben und kopiert werden k�nnen
+|* Überprüft die Page-Pointer der Show, da die Einträge über die
+|* TreeLB verschoben und kopiert werden können
\************************************************************************/
void SdDefineCustomShowDlg::CheckCustomShow()
{
@@ -554,3 +539,4 @@ IMPL_LINK( SdDefineCustomShowDlg, OKHdl, Button *, EMPTYARG
)
return 0;
}
+/* vim: set noet sw=4 ts=4: */
diff --git a/main/sd/source/ui/dlg/morphdlg.src
b/main/sd/source/ui/dlg/morphdlg.src
index f31a66c421..49a7fd2df3 100644
--- a/main/sd/source/ui/dlg/morphdlg.src
+++ b/main/sd/source/ui/dlg/morphdlg.src
@@ -19,15 +19,10 @@
*
*************************************************************/
-
-
#include "app.hrc"
#include "morphdlg.hrc"
#include "helpids.h"
-/******************************************************************************
-|*
-\******************************************************************************/
ModalDialog DLG_MORPH
{
HelpID = CMD_SID_POLYGON_MORPHING ;
diff --git a/main/sd/source/ui/notes/EditWindow.cxx
b/main/sd/source/ui/notes/EditWindow.cxx
index 227bb85e87..b6eaa9c07e 100644
--- a/main/sd/source/ui/notes/EditWindow.cxx
+++ b/main/sd/source/ui/notes/EditWindow.cxx
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,20 +7,18 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
-
-
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sd.hxx"
@@ -62,7 +60,7 @@ EditWindow::EditWindow (Window* pParentWindow, SfxItemPool*
pItemPool)
{
SetMapMode(MAP_PIXEL);
- // compare DataChanged
+ // compare DataChanged
SetBackground (GetSettings().GetStyleSettings().GetWindowColor());
maModifyTimer.SetTimeout(2000);
@@ -70,20 +68,19 @@ EditWindow::EditWindow (Window* pParentWindow, SfxItemPool*
pItemPool)
maCursorMoveTimer.SetTimeout(500);
- CreateEditView();
+ CreateEditView();
- SvxFontHeightItem aItem (GetFont().GetSize().Height(), 100,
- EE_CHAR_FONTHEIGHT);
- pItemPool->SetPoolDefaultItem (aItem);
- aItem.SetWhich(EE_CHAR_FONTHEIGHT_CJK);
- pItemPool->SetPoolDefaultItem (aItem);
- aItem.SetWhich(EE_CHAR_FONTHEIGHT_CTL);
- pItemPool->SetPoolDefaultItem (aItem);
+ SvxFontHeightItem aItem (GetFont().GetSize().Height(), 100,
+ EE_CHAR_FONTHEIGHT);
+ pItemPool->SetPoolDefaultItem (aItem);
+ aItem.SetWhich(EE_CHAR_FONTHEIGHT_CJK);
+ pItemPool->SetPoolDefaultItem (aItem);
+ aItem.SetWhich(EE_CHAR_FONTHEIGHT_CTL);
+ pItemPool->SetPoolDefaultItem (aItem);
- InsertText (UniString::CreateFromAscii("EditWindow created and ready.\n"));
+ InsertText (UniString::CreateFromAscii("EditWindow created and
ready.\n"));
}
-
EditWindow::~EditWindow (void)
{
maCursorMoveTimer.Stop();
@@ -107,7 +104,6 @@ EditWindow::~EditWindow (void)
////////////////////////////////////////
-
void SmGetLeftSelectionPart(const ESelection aSel,
sal_uInt16 &nPara,
sal_uInt16 &nPos)
// returns paragraph number and position of the selections left part
@@ -126,29 +122,21 @@ void SmGetLeftSelectionPart(const ESelection aSel,
}
}
-
-
-
EditEngine * EditWindow::GetEditEngine (void)
{
- if (mpEditEngine == NULL)
- mpEditEngine = CreateEditEngine ();
- return mpEditEngine;
+ if (mpEditEngine == NULL)
+ mpEditEngine = CreateEditEngine ();
+ return mpEditEngine;
}
-
-
-
EditEngine* EditWindow::CreateEditEngine (void)
{
- EditEngine* pEditEngine = mpEditEngine;
+ EditEngine* pEditEngine = mpEditEngine;
if (pEditEngine == NULL)
{
mpEditEngineItemPool = EditEngine::CreatePool();
- //
- // set fonts to be used
- //
+ // set fonts to be used
SvtLinguOptions aOpt;
SvtLinguConfig().GetOptions( aOpt );
//
@@ -190,7 +178,7 @@ EditEngine* EditWindow::CreateEditEngine (void)
rFntDta.nFontInfoId));
}
- // set font heights
+ // set font heights
SvxFontHeightItem aFontHeigt(
Application::GetDefaultDevice()->LogicToPixel(
Size (0, 10), MapMode (MAP_POINT)).Height(), 100,
@@ -206,7 +194,7 @@ EditEngine* EditWindow::CreateEditEngine (void)
pEditEngine->EnableUndo (sal_True);
pEditEngine->SetDefTab (sal_uInt16(
Application::GetDefaultDevice()->GetTextWidth(
- UniString::CreateFromAscii("XXXX"))));
+ UniString::CreateFromAscii("XXXX"))));
pEditEngine->SetControlWord(
(pEditEngine->GetControlWord()
@@ -215,7 +203,7 @@ EditEngine* EditWindow::CreateEditEngine (void)
(~EE_CNTRL_PASTESPECIAL));
pEditEngine->SetWordDelimiters (
- UniString::CreateFromAscii(" .=+-*/(){}[];\""));
+ UniString::CreateFromAscii(" .=+-*/(){}[];\""));
pEditEngine->SetRefMapMode (MAP_PIXEL);
pEditEngine->SetPaperSize (Size(800, 0));
pEditEngine->EraseVirtualDevice();
@@ -225,29 +213,24 @@ EditEngine* EditWindow::CreateEditEngine (void)
return pEditEngine;
}
-
-
-
void EditWindow::DataChanged (const DataChangedEvent&)
{
- const StyleSettings aSettings (GetSettings().GetStyleSettings());
+ const StyleSettings aSettings (GetSettings().GetStyleSettings());
- SetBackground( aSettings.GetWindowColor() );
+ SetBackground( aSettings.GetWindowColor() );
- // edit fields in other Applications use this font instead of
- // the application font thus we use this one too
- SetPointFont( aSettings.GetFieldFont() );
- EditEngine* pEditEngine = GetEditEngine();
+ // edit fields in other Applications use this font instead of
+ // the application font thus we use this one too
+ SetPointFont( aSettings.GetFieldFont() );
+ EditEngine* pEditEngine = GetEditEngine();
if (pEditEngine!=NULL && mpEditEngineItemPool!=NULL)
{
- //!
- //! see also SmDocShell::GetEditEngine() !
- //!
+ //! see also SmDocShell::GetEditEngine() !
- // pEditEngine->SetDefTab( sal_uInt16( GetTextWidth(
C2S("XXXX") ) ) );
+ // pEditEngine->SetDefTab( sal_uInt16(
GetTextWidth( C2S("XXXX") ) ) );
- sal_uInt16 aFntInfoId[3] = {
+ sal_uInt16 aFntInfoId[3] = {
EE_CHAR_FONTINFO, EE_CHAR_FONTINFO_CJK, EE_CHAR_FONTINFO_CTL };
for (int i = 0; i < 3; ++i)
{
@@ -280,17 +263,14 @@ void EditWindow::DataChanged (const DataChangedEvent&)
pEditEngine->SetText( aTxt );
}
- String aText (mpEditEngine->GetText (LINEEND_LF));
- mpEditEngine->Clear();
- mpEditEngine->SetText (aText);
+ String aText (mpEditEngine->GetText (LINEEND_LF));
+ mpEditEngine->Clear();
+ mpEditEngine->SetText (aText);
AdjustScrollBars();
Resize();
}
-
-
-
void EditWindow::Resize (void)
{
if (!mpEditView)
@@ -301,7 +281,7 @@ void EditWindow::Resize (void)
mpEditView->SetOutputArea(AdjustScrollBars());
mpEditView->ShowCursor();
- DBG_ASSERT( mpEditView->GetEditEngine(), "EditEngine missing" );
+ DBG_ASSERT( mpEditView->GetEditEngine(), "EditEngine missing" );
const long nMaxVisAreaStart =
mpEditView->GetEditEngine()->GetTextHeight() -
mpEditView->GetOutputArea().GetHeight();
if (mpEditView->GetVisArea().Top() > nMaxVisAreaStart)
@@ -317,9 +297,6 @@ void EditWindow::Resize (void)
Invalidate();
}
-
-
-
void EditWindow::MouseButtonUp(const MouseEvent &rEvt)
{
if (mpEditView != NULL)
@@ -328,12 +305,9 @@ void EditWindow::MouseButtonUp(const MouseEvent &rEvt)
Window::MouseButtonUp (rEvt);
// ggf FormulaCursor neu positionieren
- // CursorMoveTimerHdl(&aCursorMoveTimer);
+ // CursorMoveTimerHdl(&aCursorMoveTimer);
}
-
-
-
void EditWindow::MouseButtonDown(const MouseEvent &rEvt)
{
if (mpEditView != NULL)
@@ -344,36 +318,33 @@ void EditWindow::MouseButtonDown(const MouseEvent &rEvt)
GrabFocus();
}
-
-
-
void EditWindow::Command(const CommandEvent& rCEvt)
{
- /* if (rCEvt.GetCommand() == COMMAND_CONTEXTMENU)
+ /* if (rCEvt.GetCommand() == COMMAND_CONTEXTMENU)
{
GetParent()->ToTop();
- Point aPoint = rCEvt.GetMousePosPixel();
+ Point aPoint = rCEvt.GetMousePosPixel();
PopupMenu* pPopupMenu = new PopupMenu(SmResId(RID_COMMANDMENU));
- // added for replaceability of context menus #96085, #93782
- Menu* pMenu = NULL;
- ::com::sun::star::ui::ContextMenuExecuteEvent aEvent;
- aEvent.SourceWindow = VCLUnoHelper::GetInterface( this );
- aEvent.ExecutePosition.X = aPoint.X();
- aEvent.ExecutePosition.Y = aPoint.Y();
- if ( GetView()->TryContextMenuInterception( *pPopupMenu, pMenu, aEvent
) )
- {
- if ( pMenu )
- {
- delete pPopupMenu;
- pPopupMenu = (PopupMenu*) pMenu;
- }
- }
+ // added for replaceability of context menus #96085, #93782
+ Menu* pMenu = NULL;
+ ::com::sun::star::ui::ContextMenuExecuteEvent aEvent;
+ aEvent.SourceWindow = VCLUnoHelper::GetInterface( this );
+ aEvent.ExecutePosition.X = aPoint.X();
+ aEvent.ExecutePosition.Y = aPoint.Y();
+ if ( GetView()->TryContextMenuInterception( *pPopupMenu, pMenu,
aEvent ) )
+ {
+ if ( pMenu )
+ {
+ delete pPopupMenu;
+ pPopupMenu = (PopupMenu*) pMenu;
+ }
+ }
- pPopupMenu->SetSelectHdl(LINK(this, EditWindow, MenuSelectHdl));
+ pPopupMenu->SetSelectHdl(LINK(this, EditWindow, MenuSelectHdl));
- pPopupMenu->Execute( this, aPoint );
+ pPopupMenu->Execute( this, aPoint );
delete pPopupMenu;
}
else*/ if (mpEditView)
@@ -384,7 +355,7 @@ void EditWindow::Command(const CommandEvent& rCEvt)
}
IMPL_LINK_INLINE_START( EditWindow, MenuSelectHdl, Menu *, EMPTYARG )
{
- /* SmViewShell *pViewSh = rCmdBox.GetView();
+ /* SmViewShell *pViewSh = rCmdBox.GetView();
if (pViewSh)
pViewSh->GetViewFrame()->GetDispatcher()->Execute(
SID_INSERTCOMMAND, SFX_CALLMODE_STANDARD,
@@ -396,7 +367,7 @@ IMPL_LINK_INLINE_END( EditWindow, MenuSelectHdl, Menu *,
EMPTYARG )
void EditWindow::KeyInput(const KeyEvent& )
{
- /* if (rKEvt.GetKeyCode().GetCode() == KEY_ESCAPE)
+ /* if (rKEvt.GetKeyCode().GetCode() == KEY_ESCAPE)
{
sal_Bool bCallBase = sal_True;
SfxViewShell* pViewShell = SfxViewShell::Current();
@@ -405,7 +376,7 @@ void EditWindow::KeyInput(const KeyEvent& )
SmDocShell* pDocSh = (SmDocShell*)
pViewShell->GetViewFrame()->GetObjectShell();
if (pDocSh)
{
- // fuert zum (sofortigen) Zerstoeren von this!
+ // führt zum (sofortigen) Zerstören von this!
pDocSh->DoInPlaceActivate( sal_False );
bCallBase = sal_False;
}
@@ -415,18 +386,18 @@ void EditWindow::KeyInput(const KeyEvent& )
}
else
{
- // Timer neu starten, um den Handler (auch bei l�ngeren
Eingaben)
- // m�glichst nur einmal am Ende aufzurufen.
+ // Timer neu starten, um den Handler (auch bei längeren
Eingaben)
+ // möglichst nur einmal am Ende aufzurufen.
aCursorMoveTimer.Start();
- DBG_ASSERT( mpEditView, "EditView missing (NULL pointer)" );
- if (!mpEditView)
- CreateEditView();
+ DBG_ASSERT( mpEditView, "EditView missing (NULL pointer)" );
+ if (!mpEditView)
+ CreateEditView();
if ( !mpEditView->PostKeyEvent(rKEvt) )
{
if ( !SfxViewShell::Current()->KeyInput(rKEvt) )
{
- // fuert bei F1 (Hilfe) zum Zerstoeren von this!
+ // führt bei F1 (Hilfe) zum Zerstören von this!
Flush();
if ( aModifyTimer.IsActive() )
aModifyTimer.Stop();
@@ -445,22 +416,19 @@ void EditWindow::KeyInput(const KeyEvent& )
}
}
else
- {
+ {
// have doc-shell modified only for formula input/change and not
- // cursor travelling and such things...
+ // cursor traveling and such things...
SmDocShell *pDocShell = GetDoc();
if (pDocShell)
pDocShell->SetModified( GetEditEngine()->IsModified() );
aModifyTimer.Start();
- }
+ }
}
- */
+ */
}
-
-
-
void EditWindow::Paint(const Rectangle& rRect)
{
if (!mpEditView)
@@ -468,15 +436,12 @@ void EditWindow::Paint(const Rectangle& rRect)
mpEditView->Paint(rRect);
}
-
-
-
void EditWindow::CreateEditView (void)
{
- EditEngine* pEditEngine = GetEditEngine();
+ EditEngine* pEditEngine = GetEditEngine();
- //! pEditEngine and mpEditView may be 0.
- //! For example when the program is used by the document-converter
+ //! pEditEngine and mpEditView may be 0.
+ //! For example when the program is used by the document-converter
if (mpEditView==NULL && pEditEngine!=NULL)
{
mpEditView = new EditView (pEditEngine, this);
@@ -502,19 +467,16 @@ void EditWindow::CreateEditView (void)
mpEditView->ShowCursor(sal_True, sal_True);
pEditEngine->SetStatusEventHdl(
- LINK(this, EditWindow, EditStatusHdl));
+ LINK(this, EditWindow, EditStatusHdl));
SetPointer(mpEditView->GetPointer());
SetScrollBarRanges();
}
}
-
-
-
IMPL_LINK( EditWindow, EditStatusHdl, EditStatus *, EMPTYARG )
{
- if (!mpEditView)
+ if (!mpEditView)
return 1;
else
{
@@ -525,14 +487,14 @@ IMPL_LINK( EditWindow, EditStatusHdl, EditStatus *,
EMPTYARG )
IMPL_LINK_INLINE_START( EditWindow, ScrollHdl, ScrollBar *, EMPTYARG )
{
- DBG_ASSERT(mpEditView, "EditView missing");
- if (mpEditView)
- {
+ DBG_ASSERT(mpEditView, "EditView missing");
+ if (mpEditView)
+ {
mpEditView->SetVisArea(Rectangle(Point(mpHorizontalScrollBar->GetThumbPos(),
mpVerticalScrollBar->GetThumbPos()),
mpEditView->GetVisArea().GetSize()));
mpEditView->Invalidate();
- }
+ }
return 0;
}
IMPL_LINK_INLINE_END( EditWindow, ScrollHdl, ScrollBar *, EMPTYARG )
@@ -564,9 +526,9 @@ Rectangle EditWindow::AdjustScrollBars()
void EditWindow::SetScrollBarRanges()
{
- EditEngine* pEditEngine = GetEditEngine();
- if (mpEditView != NULL && pEditEngine != NULL)
- {
+ EditEngine* pEditEngine = GetEditEngine();
+ if (mpEditView != NULL && pEditEngine != NULL)
+ {
if (mpVerticalScrollBar != NULL)
{
long nTmp = pEditEngine->GetTextHeight();
@@ -584,7 +546,7 @@ void EditWindow::SetScrollBarRanges()
void EditWindow::InitScrollBars()
{
- if (mpEditView != NULL)
+ if (mpEditView != NULL)
{
const Size aOut( mpEditView->GetOutputArea().GetSize() );
if (mpVerticalScrollBar != NULL)
@@ -612,21 +574,19 @@ void EditWindow::InitScrollBars()
}
}
-
XubString EditWindow::GetText()
{
String aText;
- EditEngine *pEditEngine = GetEditEngine();
+ EditEngine *pEditEngine = GetEditEngine();
DBG_ASSERT( pEditEngine, "EditEngine missing" );
if (pEditEngine)
aText = pEditEngine->GetText( LINEEND_LF );
return aText;
}
-
void EditWindow::SetText(const XubString& rText)
{
- EditEngine *pEditEngine = GetEditEngine();
+ EditEngine *pEditEngine = GetEditEngine();
DBG_ASSERT( pEditEngine, "EditEngine missing" );
if (pEditEngine && !pEditEngine->IsModified())
{
@@ -638,7 +598,7 @@ void EditWindow::SetText(const XubString& rText)
pEditEngine->SetText(rText);
pEditEngine->ClearModifyFlag();
- //! Hier die Timer neu zu starten verhindert, dass die Handler
f�r andere
+ //! Hier die Timer neu zu starten verhindert, dass die Handler
für andere
//! (im Augenblick nicht mehr aktive) Math Tasks aufgerufen
werden.
maModifyTimer.Start();
maCursorMoveTimer.Start();
@@ -647,19 +607,17 @@ void EditWindow::SetText(const XubString& rText)
}
}
-
void EditWindow::GetFocus()
{
Window::GetFocus();
- if (!mpEditView)
- CreateEditView();
+ if (!mpEditView)
+ CreateEditView();
if (mpEditEngine != NULL)
mpEditEngine->SetStatusEventHdl(
- LINK(this, EditWindow, EditStatusHdl));
+ LINK(this, EditWindow, EditStatusHdl));
}
-
void EditWindow::LoseFocus()
{
if (mpEditEngine != NULL)
@@ -668,15 +626,14 @@ void EditWindow::LoseFocus()
Window::LoseFocus();
}
-
sal_Bool EditWindow::IsAllSelected() const
{
- sal_Bool bRes = sal_False;
- EditEngine *pEditEngine = ((EditWindow *) this)->GetEditEngine();
+ sal_Bool bRes = sal_False;
+ EditEngine *pEditEngine = ((EditWindow *) this)->GetEditEngine();
DBG_ASSERT( mpEditView, "NULL pointer" );
- DBG_ASSERT( pEditEngine, "NULL pointer" );
- if (pEditEngine && mpEditView)
- {
+ DBG_ASSERT( pEditEngine, "NULL pointer" );
+ if (pEditEngine && mpEditView)
+ {
ESelection eSelection( mpEditView->GetSelection() );
sal_Int32 nParaCnt = pEditEngine->GetParagraphCount();
if (!(nParaCnt - 1))
@@ -701,7 +658,6 @@ void EditWindow::SelectAll()
}
}
-
void EditWindow::MarkError(const Point &rPos)
{
DBG_ASSERT( mpEditView, "EditView missing" );
@@ -787,7 +743,7 @@ void EditWindow::SelPrevMark()
}
sal_Bool EditWindow::HasMark(const String& rText) const
- // returns true iff 'rText' contains a mark
+ // returns true if 'rText' contains a mark
{
return rText.SearchAscii("<?>", 0) != STRING_NOTFOUND;
}
@@ -873,6 +829,6 @@ void EditWindow::InsertText(const String& Text)
mpEditView->InsertText(Text);
}
-
-
} } // end of namespace ::sd::notes
+
+/* vim: set noet sw=4 ts=4: */
diff --git a/main/sd/source/ui/notes/NotesChildWindow.src
b/main/sd/source/ui/notes/NotesChildWindow.src
index 37f8589b39..6e77564d88 100644
--- a/main/sd/source/ui/notes/NotesChildWindow.src
+++ b/main/sd/source/ui/notes/NotesChildWindow.src
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,20 +7,18 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
-
-
#include "app.hrc"
#include "NotesChildWindow.hrc"
#include "sdcommands.h"
@@ -37,6 +35,8 @@ DockingWindow FLT_WIN_NOTES
Zoomable = TRUE ;
Dockable = TRUE ;
EnableResizing = TRUE ;
- Size = MAP_APPFONT ( 140 , 120 ) ;
+ Size = MAP_APPFONT ( 140, 120 ) ;
Text [ en-US ] = "Notes Window" ;
};
+
+// ********************************************************************** EOF